tony weeg on cf-talk was working on a UDF to determine if a given date was in DST (daylight savings time). he arrived at a good solution for his problem geared towards the east coast of the US. being an i18n sort of guy i suggested something a bit more global based on java.util.TimeZone and wrapped up in a CFC. its actually sort of useful in that you can "cast" to a timezone other than the one used by your cf server (ala i18n functions CFC). you can see it in action here. two things to note:
- this CFC is geared towards redsky (actually jre1.4.1 or above). my host is still running MX 6.0 (jre1.3) so the timezones info, etc. is a bit off (i had to tweak the CFC to get it to work w/mx 6.0).
- it uses the gregorian calendar for its date calculations. i'll have another timezone CFC based on IBM's icu4j lib calendars ready soon.
the CFC should be on the devet gallery in a "bit". in the meantime you can download it here.
0 Comments:
Post a Comment
<< Home