Boost logo

Boost Users :

Subject: Re: [Boost-users] Question on Posix timezone string
From: Stian Zeljko Vrba (vrba_at_[hidden])
Date: 2018-12-29 06:30:19

To add another data point to the discussion as I've been bitten by the same issue wrt dates and times. I found the following comment in my code while translating local time to utc time by using Windows native and .NET APIs:

// .Net DateTimeOffset contains _local_ ticks + offset, so that utc = local - offset
// Windows TZ information contains bias which is -offset so that utc = local + bias

It seems that there is a difference between "offset" and "bias". [1] contains the following text and formula: "The bias is the difference, in minutes, between Coordinated Universal Time (UTC) and local time […] UTC = local time + bias." [2] on the other hand operates with offsets and says "The difference between the current DateTimeOffset object's time value and Coordinated Universal Time (UTC)."

So that the TZ table contains negated offsets is plausible.



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at