diff --git a/include/date/tz.h b/include/date/tz.h index 1387bf1..6d6a2c2 100644 --- a/include/date/tz.h +++ b/include/date/tz.h @@ -1774,8 +1774,13 @@ std::basic_ostream& to_stream(std::basic_ostream& os, const CharT* fmt, const zoned_time& tp) { - auto const info = tp.get_info(); - return to_stream(os, fmt, tp.get_local_time(), &info.abbrev, &info.offset); + using duration = typename zoned_time::duration; + using LT = local_time; + auto const tz = tp.get_time_zone(); + auto const st = tp.get_sys_time(); + auto const info = tz->get_info(st); + return to_stream(os, fmt, LT{(st+info.offset).time_since_epoch()}, + &info.abbrev, &info.offset); } template