25 Time library [time]

25.10 Time zones [time.zone]

25.10.4 Information classes [time.zone.info]

25.10.4.1 Class sys_­info [time.zone.info.sys]

namespace std::chrono {
  struct sys_info {
    sys_seconds   begin;
    sys_seconds   end;
    seconds       offset;
    minutes       save;
    string        abbrev;
  };
}
A sys_­info object can be obtained from the combination of a time_­zone and either a sys_­time or local_­time.
It can also be obtained from a zoned_­time, which is effectively a pair of a time_­zone and sys_­time.
[Note
:
This type provides a low-level interface to time zone information.
Typical conversions from sys_­time to local_­time will use this class implicitly, not explicitly.
end note
]
The begin and end data members indicate that, for the associated time_­zone and time_­point, the offset and abbrev are in effect in the range [begin, end).
This information can be used to efficiently iterate the transitions of a time_­zone.
The offset data member indicates the UTC offset in effect for the associated time_­zone and time_­point.
The relationship between local_­time and sys_­time is:
offset = local_time - sys_time
The save data member is extra information not normally needed for conversion between local_­time and sys_­time.
If save != 0min, this sys_­info is said to be on “daylight saving” time, and offset - save suggests what offset this time_­zone might use if it were off daylight saving time.
However, this information should not be taken as authoritative.
The only sure way to get such information is to query the time_­zone with a time_­point that returns a sys_­info where save == 0min.
There is no guarantee what time_­point might return such a sys_­info except that it is guaranteed not to be in the range [begin, end) (if save != 0min for this sys_­info).
The abbrev data member indicates the current abbreviation used for the associated time_­zone and time_­point.
Abbreviations are not unique among the time_­zones, and so one cannot reliably map abbreviations back to a time_­zone and UTC offset.
template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const sys_info& r);
Effects: Streams out the sys_­info object r in an unspecified format.