Workbench: Programming, Publishing, Politics, and Popes

Subscriptions

Menu

Working On

World Readable

Technorati

XFN Friendly

Handling Daylight Savings Time in ColdFusion

SportsFilter has been misreporting the time on posts and comments since the U.S. sprang forward, reporting times in CST instead of CDT.

To fix the problem, I wrote a few lines of ColdFusion code to set a tzid variable to the proper timezone identifier:

<cfset tzinfo = GetTimeZoneInfo()>
<cfset tzid = "CST">
<cfif tzinfo.isDSTOn IS "True">
  <cfset tzid = "CDT">
</cfif>

Comments

Thank you!


 

Add a Comment

These HTML tags are permitted: p, b, i, a, and blockquote. A comment may not include more than three links. Participants in this discussion should note the site's moderation policy.

:
:
:

Twitter

Russell Brand's rock star in 'Forgetting Sarah Marshall' needs his own movie. 3 days ago






Home | Comments | Books | Code | RSS Feed | RSS Spec | Copyright 2008 World Readable