diff --git a/tz.h b/tz.h index b28f2bd..77f2282 100644 --- a/tz.h +++ b/tz.h @@ -984,15 +984,14 @@ make_zoned(const std::string& name, const sys_time& st) return {name, st}; } - template inline std::ostream& operator<<(std::ostream& os, const zoned_time& t) { - // this should not use two lookups! - return os << floor(t.zone_->to_local(t.tp_)) << ' ' - << t.zone_->get_info(t.tp_).abbrev; + auto i = t.zone_->get_info(t.tp_); + auto lt = t.tp_ + i.offset; + return os << lt << ' ' << i.abbrev; } class utc_clock