Sounds like a solid plan to me. Adjust to GMT on insert, display in
whatever timezone you like. I believe the function GetTimeZoneInfo()
will return a struct with the server's offset info.

1) Convert the date from whatever timezone to GMT (use the server's offset).
2) Display using the offset for EST (GMT -5), or whatever timezone you choose

Example:
PST is -8 hours behind GMT. Say you have a date of 7/2/04 4:00pm PST
to insert. You'd insert it as 7/3/04 00:00am (7/2/04 4:00pm + 8 hours)
and when you pull it out of the db and want to display it in say EST,
you would subtract 5 hours and get 7/2/04 7:00PM

----- Original Message -----
From: Mark Leder <[EMAIL PROTECTED]>
Date: Fri, 2 Jul 2004 11:22:46 -0400
Subject: Posting to db as GMT date/time
To: CF-Talk <[EMAIL PROTECTED]>

Hi all,
I have a forum app which is hosted in Arizona, but almost all users are here
in Ohio.  When a message is posted or replied to, I use
#CreateODBCDate(Now())# which inserts the post to Arizona Time (theire time
zone doesn't seem to follow anyone elses).  I'm thinking that a better
solution might be to post to GMT 0 time, then on db query and display, call
the local time zone in Ohio time (EDT).

Two issues:
1) How do I code the date as GMT for insertion to SQL 2000
2) How to I create the time difference for Ohio?

I'm using CFMX 6.1 with Win 2003.

Thanks, Mark________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to