const std::chrono::zoned_time<Duration2, TimeZonePtr>& y); (C++20 起) 比较二个 zoned_time 值x 和y 。若二个 zoned_time 对象的时间点和时区指针按照 operator== 比较相等,则它们比较相等。 != 运算符从 operator== 合成。 返回值 x.get_time_zone() == y.get_time_zone() && x.get_...
get_info(); return std::chrono::to_stream(os, fmt, tp.get_local_time(), &info.abbrev, &info.offset);格式字符串 格式字符串由零或多个转换说明符和通常字符(除了 % )构成。写入除了空终止字符的所有通常字符到输出流,而不修改。每个不修饰的转换说明符以 % 字符后随确定该说明符行为的字符开始。
conststd::chrono::zoned_time<Duration, TimeZonePtr>&tp); (C++20 起) tp os fmt autoinfo=tp.get_info();returnstd::chrono::to_stream(os, fmt, tp.get_local_time(),&info.abbrev,&info.offset); 格式字符串 格式字符串由零或多个转换指定符和通常字符(除了%)构成。写入除了空终止字符的所有通...
zoned_time(constzoned_time&other)=default; (3)(since C++20) template<classDuration2> zoned_time(conststd::chrono::zoned_time<Duration2, TimeZonePtr>&other); (4)(since C++20) explicitzoned_time(TimeZonePtr z); (5)(since C++20) ...
namespaceMyTime {usingclock_t= std::chrono::system_clock;usingduration_t=clock_t::duration;usingtime_point_t= std::chrono::zoned_time<duration_t>;time_point_tnow(){returnstd::chrono::zoned_time{std::chrono::current_zone(),clock_t::now()}; }std::stringto_string(time_point_ttp){...
> class zoned_time; (C++20 起) 类zoned_time 表示时区与解析为 Duration 的std::chrono::time_point 的逻辑配对。 zoned_time 的不变量是它始终指代合法的时区并表示该时区中存在且无歧义的时间点。为与此不变量一致, zoned_time 无移动构造函数或移动赋值运算符;试图移动 zoned_time 将进行复制。
struct hash<std::chrono::zoned_time<Duration, TimeZonePtr>>; (since C++26) The template specialization of std::hash for std::chrono::zoned_time allows users to obtain hashes of objects of type std::chrono::zoned_time<Duration, TimeZonePtr>. This specialization is enabled if and only...
Create std::chrono::zoned_time from zone and time and I'm not sure if it works in all circumstances. I'm not sure if 10 January 2023 22:15 is always 10 January 2023 + 22h + 15 min And I'm thinking of some corner cases where for example we are in the middle of taking in...
我想这就是你想要的:
Constructing and exporting a std::chrono::zoned_time object from a module (after importing VC++ module std) fails with “error C1116: unrecoverable error importing module ‘std’. Specialization of ‘std::chrono::_Make_unique_tzdb_info’ with arguments '__std_tzdb_current_zone_info ...