Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2005-05-01
Medium Priority
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 ASP.net 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

coreybryant earned 1000 total points
ID: 13910705
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

rcmb earned 1000 total points
ID: 13913971
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 24

Expert Comment

ID: 14234114
LVL 24

Expert Comment

ID: 15669935
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

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

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses
Course of the Month21 days, 7 hours left to enroll

810 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