date icon indicating copy to clipboard operation
date copied to clipboard

How to set the time?

Open CKD4XXH opened this issue 4 years ago • 1 comments

Is the Date library capable to set the current (system) time? How can I set the system time, without using time_t?

(clock_settime uses time_t, as I know.)

CKD4XXH avatar Oct 04 '21 14:10 CKD4XXH

It can not. <chrono>, and this library, provide a read-only view of the std-supplied clocks. One could of course write a custom clock that is settable.

HowardHinnant avatar Oct 04 '21 15:10 HowardHinnant