|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Get the UTC offset of a future date
I just ran into a problem in one of my apps with the daylight savingsJudah McAuley 03/15/10 05:16 P http://www.sustainablegis.com/projects/tz/testTZCFC.cfPaul Hastings 03/15/10 08:54 P That looks great Paul, thank you muchly.Judah McAuley 03/18/10 01:05 P I just ran into a problem in one of my apps with the daylight savings time changeover and I'm not sure about the best way to deal with it. I import appointments that are scheduled out in the future. When the appointments come in in UTC format, I need to calculate the local time for the event. This works fine in normal operation as I can just get the UTC Offset using GetTimeZoneInfo(). However, that doesn't work correctly across the daylight savings time boundary. Lets say I get an appointment that comes to my server on March 12th. At that point in time my server is on Pacific Standard Time, GMT-8. If the appointment is scheduled for March 15th, the correct offset for the server at that future point in time would be GMT-7 because of the switchover to daylight savings time. That means when I do my calculation at import time I'm an hour off. So, I need a way to get the UTC offset for a future date and, ideally, an arbitrary location. GetTimeZoneInfo() doesn't take any arguments, so it doesn't seem like I can give it a date/time object. None of the other Date/Time functions in CF seem to handle this case either. Any thoughts? Thanks, Judah That looks great Paul, thank you muchly. Judah > > http://www.sustainablegis.com/projects/tz/testTZCFC.cfm
|
July 31, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||