diff --git a/tz.h b/tz.h index c1c261f..47a63b4 100644 --- a/tz.h +++ b/tz.h @@ -1122,7 +1122,8 @@ inline std::basic_ostream& operator<<(std::basic_ostream& os, const zoned_time& t) { - return to_stream(os, "%F %T %Z", t); + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); } #if !MISSING_LEAP_SECONDS @@ -1231,7 +1232,8 @@ template std::basic_ostream& operator<<(std::basic_ostream& os, const utc_time& t) { - return to_stream(os, "%F %T", t); + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); } template > @@ -1347,7 +1349,8 @@ template std::basic_ostream& operator<<(std::basic_ostream& os, const tai_time& t) { - return to_stream(os, "%F %T", t); + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); } template > @@ -1453,7 +1456,8 @@ template std::basic_ostream& operator<<(std::basic_ostream& os, const gps_time& t) { - return to_stream(os, detail::make_string::from("%F %T").c_str(), t); + const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}}; + return to_stream(os, fmt, t); } template >