https://bugs.kde.org/show_bug.cgi?id=410490

            Bug ID: 410490
           Summary: Resource bundle dates don’t follow user’s regional
                    settings for display (and are incorrectly encoded)
           Product: krita
           Version: git master
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Resource Management
          Assignee: krita-bugs-n...@kde.org
          Reporter: k...@huftis.org
  Target Milestone: ---

SUMMARY
In the resource bundle dialogue, the ‘Created’ and ‘Updated’ dates are always
shown in the DD/MM/YYYY format, instead of the user’s preferred date format.
Besides looking strange for users not used to this format (e.g. American
users), it’s often ambiguous (is 01/08/2019 the August 1 or January 8?).

Also, in the actual resource bundle file, meta.xml, the dates are stored in
this format:

 <meta:creation-date>01/08/2019</meta:creation-date>
 <meta:dc-date>01/08/2019</meta:dc-date>

But these are invalid values, since the bundle file uses the OpenDocument
schema. The ‘meta:creation-date’ and ‘meta:dc-date’ must be (according to
https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415108_253892949)
of the data type ‘dateTime’. This format is defined in
https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime. An example of a
valid ‘dateTime’ is ‘2002-10-10T12:00:00-05:00’ (noon on 10 October 2002,
Central Daylight Savings Time as well as Eastern Standard Time in the U.S.).


STEPS TO REPRODUCE
1. Ensure you have a regional settings (e.g. in KDE or Windows) with a date
format different than DD/MM/YYYY.
2. Go to ‘Settings → Manage Resources’.
3. Click an active bundle.
4. Click ‘Open Resource Bundle’, navigate to the ‘bundles’ folder, unzip a
bundle file and take a look into the ‘meta.xml’ file.


OBSERVED RESULT
In step 3: The ‘Created:’ and ‘Updated:’ fields for the chosen bundle is shown
as date in the DD/MM/YYYY format (e.g. ‘24/12/2018’).

In step 4: The ‘meta:creation-date’ and ‘meta:dc-date’ elements are encoded in
the DD/MM/YYYY format.


EXPECTED RESULT
In step 3: The ‘Created:’ and ‘Updated:’ fields for the chosen bundle should be
shown in the user’s preferred date or datetime format.

In step 4: The ‘meta:creation-date’ and ‘meta:dc-date’ elements should be
stored in the ‘dateTime’ format defined in
https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20190726
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0
Kernel Version: 5.2.2-1-default


ADDITIONAL INFORMATION
It’s best if the datetimes are stored *with a timezone* (either the user’s, or
UTC/‘Zulu’, e.g. ‘2000-03-04T20:00:00Z’), since only then is the actual point
in time defined.

Also note that, when *displaying* the datetime, the date displayed is *not*
necessary equal to the 10 first characters in the the datetime string, since it
depends on the *user’s* timezone (so the date shown may be one day
before/after). But Qt should handle all this automatically.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to