27 Time library [time]

27.11 Time zones [time.zone]

27.11.4 Information classes [time.zone.info]

27.11.4.2 Class local_­info [time.zone.info.local]

namespace std::chrono {
  struct local_info {
    static constexpr int unique      = 0;
    static constexpr int nonexistent = 1;
    static constexpr int ambiguous   = 2;

    int result;
    sys_info first;
    sys_info second;
  };
}
[Note
:
This type provides a low-level interface to time zone information.
Typical conversions from local_­time to sys_­time will use this class implicitly, not explicitly.
— end note
]
Describes the result of converting a local_­time to a sys_­time as follows:
  • When a local_­time to sys_­time conversion is unique, result == unique, first will be filled out with the correct sys_­info, and second will be zero-initialized.
  • If the conversion stems from a nonexistent local_­time then result == nonexistent, first will be filled out with the sys_­info that ends just prior to the local_­time, and second will be filled out with the sys_­info that begins just after the local_­time.
  • If the conversion stems from an ambiguous local_­time, then result == ambiguous, first will be filled out with the sys_­info that ends just after the local_­time, and second will be filled out with the sys_­info that starts just before the local_­time.
template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const local_info& r);
Effects: Streams out the local_­info object r in an unspecified format.
Returns: os.