fix formatting of timezone in iso timestamps
[libi2ncommon] / src / timefunc.cpp
index a4d38b8..805ffae 100644 (file)
@@ -813,17 +813,17 @@ namespace iso8601 {
     static const char *const formatter [ISO8601_SIZE] =
     { /* [iso8601::d  ] = */ "%4Y-%m-%d",
       /* [iso8601::t  ] = */ "%T",
-      /* [iso8601::tz ] = */ "%TZ%z",
+      /* [iso8601::tz ] = */ "%T%z",
       /* [iso8601::dt ] = */ "%4Y-%m-%dT%T",
-      /* [iso8601::dtz] = */ "%4Y-%m-%dT%TZ%z",
+      /* [iso8601::dtz] = */ "%4Y-%m-%dT%T%z",
     };
 
     static const char *const scanner [ISO8601_SIZE] =
     { /* [iso8601::d  ] = */ "%Y-%m-%d",
       /* [iso8601::t  ] = */ "%T",
-      /* [iso8601::tz ] = */ "%TZ%z",
+      /* [iso8601::tz ] = */ "%T%z",
       /* [iso8601::dt ] = */ "%Y-%m-%dT%T",
-      /* [iso8601::dtz] = */ "%Y-%m-%dT%TZ%z",
+      /* [iso8601::dtz] = */ "%Y-%m-%dT%T%z",
     };
 
     static inline const char *
@@ -959,7 +959,7 @@ scan_iso8601 (const char *s,
         }
         /*
          * Contrary to what the man page indicates, strptime(3) is *not*
-         * the inverse operation of strftime(3)! The later correctly formats
+         * the inverse operation of strftime(3)! The latter correctly formats
          * negative year numbers with the %F modifier wheres the former trips
          * over the sign character.
          */