View Full Version : Managing dates

12-10-2004, 09:40 PM
I am building an asp forum.
My problem is with the display dates. I mean every user in every timezone has a different time. And also some computers have incorrect time on them.
So when by using VBScript i get the time from the user it cud b absard.
I want to use one specific time for all posts. And to display correct time for every post made.
I mean every person in a particular GMT zon will see the correct time for his zone.

12-11-2004, 06:54 PM
if you use the Time() Date() and Now() functions the result is from the server's clock, if you ask a user for their timedifference you can then add or subtract this so it shows the time in their timezone (the list of the possible timezones can be selected according to which one they are nearest too with javascript but if their clock is wrong it may default to the wrong one on the list.. then theres GMT/BST differences and some conutries have daylight savings and some dont. but they can still select their time difference manually, it just automatically starts on what it would be if their clock was right

12-31-2004, 02:13 AM
Here is a tiny bit of related timezone code that hopefully could give you some ideas (assuming that you can store some kind of time offset in each user's record):

mintServerToOrgHourOffset = 1 ' Server is Mountain Time and org is Central Time.
mvarOrgCurDtTime = DateAdd("H", mintServerToOrgHourOffset, Now())