All of our applications run using UTC and time conversation are done from there.
>#1 - store the data in GMT - which I think is without any daylight
>savings time modifications, right?
You'd want to use UTC (Universal coordinated time) which do not have any
daylight saving instead of GMT.
Here's a piece of code I see all the time:
<cfset today = DateConvert("local2UTC", Now())/>
I wish I could just go Now("UTC") instead!
>#2 - Display the dates/times according to a configured timezone setting
>for the whole message board OR a configured time zone setting for a
>specific logged in user - taking daylight savings into consideration.
>
>It's easy enough to handle conversion from one TZ to another except when
>dealing with daylight savings time. I'm really not sure what to do here...
This is the exactly problem we ran into a few years ago. We use a highly
customized version of a the TimeZone CFC at cfczone.org which utilizes some
java classes. This way we can cast from UTC to any time zone and vice versa.
Sorry to say I can't give you our TimeService.cfc (includes customizable
holiday support, timezone and other fun conversion stuff).
HTH,
...Peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238045
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54