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

Add full timezone support in QDateTime

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.4.1
    • Core: Date/Time
    • None

    Description

      It should be possible to assign a value of yyyyMMDDhhmmss.zzzTZ (where TZ is a timezone in the format of +/-(0,23, inclusive) to a DateTime and get it out in any other timezone.
      The current UTC support is incomplete because the TZ is not stored with the date value, so one does not know if it is already converted to a specific TZ. This can lead to date/times being displayed wrong on widgets.

      All times could be converted and stored as UTC, with math done in terms of seconds. 5 means UTC(3600*5). When fetching or setting, there are two cases:
      1) get/set with no TZ (assume local TZ, and DST, unless told otherwise to expect UTC) ( datetime.setTimeZone(-5);
      2) get/set with with TZ (in which case allow conversion to any TZ. eg. datetime.valueForZone(-5); datetime.valueForLocalZone())

      Attachments

        Issue Links

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

          Activity

            People

              stormols Marius Storm-Olsen
              admin Administrator
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes