You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sys_seconds is a type alias for time_point<system_clock, seconds>. And system_clock is defined to be Unix Time (UTC excluding leap seconds). The parse knows that tp represents UTC by its type, and therefore subtracts the UTC offset from the local time for you.
To handle milliseconds you simply change type of tp:
sys_time<milliseconds> tp;
You could have also used the milliseconds-precision tp on the first string.
To get the milliseconds field separately, just truncate tp to seconds and subtract that off:
Hi!
There is a string format: "2018-12-15 04:49:00+07"
How do I get the time_t format?
How do I get utc time?
What if the format is like this: "2018-12-15 04:49:00.000+07"
How can I get msec separately?
Thanks!
The text was updated successfully, but these errors were encountered: