Menu

#3 Date does not round-trip

open
nobody
None
5
2008-12-29
2008-12-29
No

There are a couple things wrong with DateTimeParser that prevent it from round-tripping properly. The following format seems to work well:

DATEFORMAT_YAML = "yyyy-MM-dd HH:mm:ss.SSS Z"

But it might be even better to omit the time zone and use UTC as recommended here (not knowing squat about the YAML spec or design goals, etc): http://yaml.org/type/timestamp.html

Very useful package, btw.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB