add the date and time to site  - host in different time zone

Posted on 2005-05-01
Last Modified: 2013-12-24
Hello...How do I add the date and time to my site.  Please note the server host is in PST and I am in EST so i need to add 3 hours if for date and time; or get time externally some where.  Platform = Win IIS and can run ASP and PHP.

As you may tell from the topic area (Front Page), I'm no web master.  Thanks!!! riley
Question by:Ripley419
    LVL 29

    Accepted Solution

    You can use JS - this would pull the time from the local computer of the user (you in the EST or me in the PDT)

    LVL 12

    Assisted Solution

    This is in asp:

    The local time is <%=Hour(Now()) +3 %>:<%=Minute(Now())%>:<%=Second(Now())%>

    displays 24 hour time

    Dim newHour, AMPM, localHour
    localHour = Hour(Now()) + 3

    If localHour > 12 Then
          newHour = localHour - 12
          AMPM = "PM"
    Elseif localHour <= 12 Then
          newHour = localHour
          AMPM = "AM"
    End if
    The local time is <%= newHour %>:<%=Minute(Now())%>:<%=Second(Now())%> <%=AMPM%>

    LVL 23

    Expert Comment

    LVL 23

    Expert Comment

    I think my reply deserves a share of the points - The provided link gives a full solution to the question. The solution is aimed at Frontpage users.
    LVL 20

    Expert Comment

    It is a month and a half after any comment here and is not a direct answer but a tutorial :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Now that Expression Web 4.0 ( is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
    The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now