chiark / gitweb /
TOML::Tiny::Faithful: Use ISO8601 for parsing
[nailing-cargo.git] / lib / TOML / Tiny / Faithful.pm
index 42edf1bdba42947fbf6d429d84d6e42bb4e9dc1b..e372d5d1c0a48a4b59d1768b284f02c20f31ef0b 100644 (file)
@@ -1,6 +1,7 @@
 
 package TOML::Tiny::Faithful;
 use parent TOML::Tiny;
+use DateTime::Format::ISO8601;
 use DateTime::Format::RFC3339;
 
 use DateTime;
@@ -13,7 +14,8 @@ our @EXPORT = qw(
 
 sub _options {
   inflate_datetime => sub {
-    DateTime::Format::RFC3339->parse_datetime(shift);
+    # RFC3339 bombs out if there is no timezone, so we parse with 8601
+    DateTime::Format::ISO8601->parse_datetime(shift)
   },
   inflate_integer => sub { 
     use bignum;