-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I'm not sure if this is working as expected:
struct std::tm epoch = {0};
epoch.tm_isdst = 0;
epoch.tm_sec = epoch.tm_min = epoch.tm_hour = epoch.tm_mon = 0;
epoch.tm_mday = 1;
epoch.tm_year = 70;
time_t local_tz_offset = mktime(&epoch);
...
return mktime(&t) - local_tz_offset;
I'm getting local_tz_offset -3600 on my computer.
but the thing is that mktime looks is not following the timezone offsets.
In fact, what was correct to me, was to not use this local_tz_offset adjust.
Now because of the - (-3600) it gives me +1hour
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working