EasyCFM.COM ColdFusion Forums / Coding Help! / DST?

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: DST?

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

][ce
07-26-2005 @ 9:02 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 25
Joined: Jul 2003

Hey everybody!

Is it possible to determine, through Coldfusion, whether or not we are currently in Daylight Savings Time?

Daylight Saving Time begins for most of the United States at 2 a.m. on the first Sunday of April. Time reverts to standard time at 2 a.m. on the last Sunday of October.

Any help would be greatly appreciated.
Thanks!
Dave

kene
07-26-2005 @ 10:21 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 180
Joined: Sep 2003

Just off the top of my head you could use a couple of UDF's to determine the beginning and end of day light savings time for the current year and then check to see if the current date/time is between those two values. Probably other ways to do this, but this should work. Remember that the current date/time is probably going to be specific to the location of the server hosting the site. You could adjust for that time if needed.

See the UDF's at:
http://www.cflib.org/udf.cfm?ID=236
and
http://www.cflib.org/udf.cfm?ID=237



Website Designed and Developed by Pablo Varando.