mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-06 14:14:27 +02:00
Updated Examples and Recipes (markdown)
@@ -2373,9 +2373,10 @@ tzdb_manager(std::atomic<bool>& run)
|
|||||||
using namespace date;
|
using namespace date;
|
||||||
// Get the current UTC time for today's local 02:00, approximation is ok
|
// Get the current UTC time for today's local 02:00, approximation is ok
|
||||||
auto tz = current_zone();
|
auto tz = current_zone();
|
||||||
zoned_time check_at{tz, floor<days>(zoned_time{tz, system_clock::now()}
|
auto check_at = zoned_time{tz,
|
||||||
.get_local_time()) + 2h,
|
floor<days>(zoned_time{tz, system_clock::now()}
|
||||||
choose::latest}.get_sys_time();
|
.get_local_time()) + 2h, choose::latest}
|
||||||
|
.get_sys_time();
|
||||||
// Initialize clean-trigger for several years in the future
|
// Initialize clean-trigger for several years in the future
|
||||||
auto clean_at = check_at + days{1000};
|
auto clean_at = check_at + days{1000};
|
||||||
while (run)
|
while (run)
|
||||||
|
Reference in New Issue
Block a user