House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Get the UTC offset of a future date

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Judah McAuley
03/15/2010 05:16 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Judah McAuley
03/18/2010 01:05 PM

That looks great Paul, thank you muchly. Judah > > http://www.sustainablegis.com/projects/tz/testTZCFC.cfm


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

July 31, 2010

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31