Pete Freitag Pete Freitag

Parsing Atom Dates (ISO8601) in ColdFusion


Need to parse the dates in an Atom feed? Atom feeds use ISO 8601 formatted dates, something like this; 1994-11-05T08:15:30-05:00 with a UTC offset, or like this: 1994-11-05T13:15:30Z in GMT. You can come across both formats in an Atom feed, the atom:modified element MUST have a timezone specified, while the atom:issued element MAY specify a timezone.

Before getting too far, I checked CFLib's date library, and sure enough I found a function called DateConvertISO8601 by David Satz. From my limited testing the function seams to work well for parsing Atom / ISO8601 dates.

Like this? Follow me ↯

Parsing Atom Dates (ISO8601) in ColdFusion was first published on February 24, 2005.

If you like reading about atom, xml, or cfml then you might also like:

FuseGuard Web App Firewall for ColdFusion

The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.


After looking at the code I realize that this method does not handle all formats (if you don't specify seconds, it will fail, or if you specify fraction of a second it will fail). I may end up writing my own
by Pete Freitag on 02/24/2005 at 12:58:45 PM UTC
Hi Peter. Do you know of any custom CF tags that parse atom feeds? I have found a few for RSS 2.0 but have yet to find an atom parser. Thank you!
by Jeff Lemmon on 04/04/2006 at 7:23:14 PM UTC
The link to the DateConvertISO8601 UDF is broken (because URL rewrites were set up when the website became "static".) The new URL is
by James Moberg on 12/27/2017 at 3:34:19 PM UTC