Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Managing dates

  1. #1
    New to the CF scene
    Join Date
    Nov 2004
    Thanked 0 Times in 0 Posts

    Unhappy Managing dates

    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.

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Thanked 13 Times in 13 Posts
    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

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Thanked 2 Times in 2 Posts
    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())
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts