Closed xjsxujingsong closed 2 years ago
Doing some drive-by simplifications:
auto t = system_clock::now();
auto zone = date::locate_zone("Australia/Sydney");
zoned_time tt{zone, t};
t = tt.get_sys_time(); // UTC time_point
auto lt = tt.get_local_time(); // local time_point
Hi @HowardHinnant Thanks for your prompt response.
I would like to convert zoned_time to chrono::time_point
Just found it.
Thanks.
auto cc = clock_cast
Just tt.get_sys_time();
is all you need.
As described. time_point t = system_clock::now(); auto zone = date::locate_zone("Australia/Sydney"); zoned_time tt = make_zoned(zone, t); How to convert tt back to time_point?