...

View Full Version : Formating Date according to Time Zone.



isaaclloyd
08-16-2005, 05:20 AM
I am working on trying to get a script where it will display the date and time in a format that I want. I already have a script for time, where it takes the time now from the server and -2 hours (which works for my time zone). The only problem I have is this:

Lets say that it's 9:59pm (using my -2 time code) the server time is 11:59pm. Now when the server goes to 12:00am the date changes. However my time script says it's 10:00pm.

I am wondering if there is a way to make the date obey my time script and not change dates at 10:00pm. Any comments or suggestions would greatly be appreciated. Thanks.


~Isaac~

NancyJ
08-16-2005, 10:48 AM
session.LCID = whatever locale you want to display or
http://support.microsoft.com/kb/q229690/ shows you how to serve the correct time according to the users browser language settings

Bullschmidt
08-17-2005, 11:35 PM
I am wondering if there is a way to make the date obey my time script and not change dates at 10:00pm. Any comments or suggestions would greatly be appreciated.

Here's a snippet of code I've used to do something similar:

mintServerToOrgHourOffset = 2 ' Server is Pacific Time and org is Central Time.
mvarOrgCurDtTime = DateAdd("H", mintServerToOrgHourOffset, Now())
mvarOrgCurDt = DateValue(mvarOrgCurDtTime)
mvarOrgCurTime = TimeValue(mvarOrgCurDtTime)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum