This will tell you if a date/time is currently in DST, assuming it's in an area with the most common US DST rules.
<cfscript> // // Determine if a date/time falls within Daylight Savings Time period // - 2AM on the first Sunday in April to 2AM on the last Sunday in October // function IsDST(dt) { var yr = Year(dt); var DSTBegin = CreateDateTime(yr, 4, 8 - DayOfWeek(CreateDate(yr, 4, 7)), 2, 0, 0); var DSTEnd = CreateDateTime(yr, 10, 32 - DayOfWeek(CreateDate(yr, 10, 31)), 2, 0, 0); return (dt gte DSTBegin) and (dt lt DSTEnd); } </cfscript> ----- Original Message ----- From: "Tony" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Thursday, May 11, 2006 1:03 PM Subject: Re: How do I detect day lights savings? > :) never is so fun to say tho' > > tw > > On 5/11/06, Paul Hastings <[EMAIL PROTECTED]> wrote: >> Tony wrote: >> > it works here in america, where the application i use it for will >> > ALWAYS reside :) >> >> in the i18n world you just violated a big honking taboo, "never say >> never". now you're screwed. probably have to make it i18n first thing >> tomorrow ;-) >> >> > and yeah, congress... ill change it when it comes to that. >> >> you'll remember? lying on the fairway concussed by some errant golf >> ball? >> >> > so no, its not i18n friendly, but i bet you could help me get it >> > there! >> >> no need, the timezone CFC does most stuff folks need or have asked for. >> though lately i've started to recommend using icu4j's timezone class as >> the base for the CFC as it's olson data (and other tasty bits) get >> updated way way more frequently than core java. and in any case >> updating >> it is kind of difficult w/cf but you could get caught w/your pants >> down. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240290 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54