[Interest] Relashionship between time_t and QDateTime
mauceri at actgate.com
Wed Aug 28 10:22:40 CEST 2013
On 8/27/2013 11:01 PM, Constantin Makshin wrote:
> The original Calogero's message mentioned a file from December 2007, a
> date outside of DST (unless there's a country that uses DST during
> winter). Now it's August, so the DST is active and during "UTC -> local
> time" conversion Windows adds that 1 hour Calogero is seeing. DST gets
> incorrectly applied because it's active at the moment of conversion,
> although it wasn't used at the moment the original timestamp represents.
> I bet that the problem will go away when DST ends [again]. :)
I think Constantin's analysis is correct.
Just for your information, I'm using Qt 4.8.4. The machine where I
noticed the problem is running Microsoft Windows Server 2003.
The Time Zone is set to (GMT-05:00) Eastern Time (US & Canada), in DST
Let me know if you need any additional information
> On 08/27/2013 11:42 PM, Thiago Macieira wrote:
>> On terça-feira, 27 de agosto de 2013 22:59:44, Constantin Makshin wrote:
>>> Windows can store information about daylight saving transitions for past
>>> years, but always uses one for the current year. And since daylight
>>> saving transition dates and time tend to slightly drift from year to
>>> year, there's absolutely no guarantees of getting correct time
>>> conversion results; in general case 1-hour error is nearly inevitable.
>>> If you're on Windows, either calculate and apply DST yourself or forget
>>> about correct "UTC <-> local time" conversions.
>> This is not about the corner case of a file that was created in the hour of the
>> transition, or even in the week that shifted between non-DST in one year to
>> DST in another (or vice-versa).
>> >From what I understand, we're talking about a file created in DST and checked
>> outside of DST (or vice-versa) in the *same* *year*.
> Interest mailing list
> Interest at qt-project.org
Applied Coherent Technology Corporation (ACT)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest