Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.1
-
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
- replaces
-
QTBUG-1030 concerns about QDate::timeZoneOffset
-
- Closed
-