Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56397

Failing fromMSecs/toMSecs round-trip tests on MS-Win

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • None
    • 5.6, 5.7, 5.8
    • Core: Date/Time
    • None
    • MS-Win 7, x86, MSVC 2010
    • 6e3f58cbbe313c3b843f69f3110e3c795fef6da8

    Description

      Testing [0] revealed [1] failures in several time-zones on MS-Win, on 1970-10-25 and 2010-10-31; Baghdad failed on the later date, two zones in the Pacific on the former and 22 others on both. On each failing date all times tested failed: round-tripping via QDateTime's fromMsecs/toMSecs got back a changed time_t value. In most cases, the error was exactly the time-zone offset in effect at the time tested; however:

      • Pacific/Apia is off by 25 hours in 1970, when its offset was -11 hours (with no DST; it has since switched to +13 with DST);
      • Pacific/Fiji is off by 1 hour in 1970, when its offset was +12 hours (with no DST; it has since enabled DST);
      • Asia/Thimphu is off by 6 hours in both cases, having shifted from 5.5 to 6 hours in 1987 (so its error matches its present offset, even in 1970 when its offset was different)
      • (India/Mahe and India/Reunion are off by 4 hours and I don't know their actual offsets (they have no transitions in the interval); but India/Mauritius is also off by 4 hours and that was its offset at both dates.)

      Full list of zones:

      • Africa/Tripoli
      • America/Argentina/La_Rioja
      • America/Argentina/Rio_Gallegos
      • America/Argentina/Salta
      • America/Argentina/San_Juan
      • America/Argentina/San_Luis
      • America/Argentina/Tucuman
      • America/Argentina/Ushuaia
      • America/Bahia
      • America/Buenos_Aires
      • America/Catamarca
      • America/Cordoba
      • America/Jujuy
      • America/Mendoza
      • Antarctica/Casey
      • Asia/Baghdad (only 2010)
      • Asia/Dhaka
      • Asia/Karachi
      • Asia/Thimphu
      • Australia/Perth
      • Indian/Mahe
      • Indian/Mauritius
      • Indian/Reunion
      • Pacific/Apia (only 1970)
      • Pacific/Fiji (only 1970)

      Of these only the last two are presently inflicting DST on themselves, although most have flirted with it. None of these zones had a transition in 1970. A few had transitions in 2010, but the one closest to the tested date was Pacific/Apia entering DST a week before.

      It is possible we have two bugs here, something like:

      • using present zone info for historical dates, at least for some zones; and
      • ignoring the zone's offset in one direction of the round-trip while correctly accounting for it in the other, albeit apparently only for some zones.

      MS's native APIs may be the culprits: ISTR they make some simplifications, I shall need to read up on them again.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Eddy Edward Welbourne
              Eddy Edward Welbourne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes