<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>410490</bug_id>
          
          <creation_ts>2019-08-01 17:46:54 +0000</creation_ts>
          <short_desc>Resource bundle dates don’t follow user’s regional settings for display (and are incorrectly encoded)</short_desc>
          <delta_ts>2019-08-02 12:13:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Resource Management</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Karl Ove Hufthammer">karl</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/kde/krita/commit/b582ead9ecf83a331f8c39b24dd47bd4e60f881d</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1872441</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Ove Hufthammer">karl</who>
    <bug_when>2019-08-01 17:46:54 +0000</bug_when>
    <thetext>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:

 &lt;meta:creation-date&gt;01/08/2019&lt;/meta:creation-date&gt;
 &lt;meta:dc-date&gt;01/08/2019&lt;/meta:dc-date&gt;
 
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872561</commentid>
    <comment_count>1</comment_count>
    <who name="wolthera">griffinvalley</who>
    <bug_when>2019-08-02 10:33:15 +0000</bug_when>
    <thetext>Git commit 7fb302012a1ed54f9957d1549e71d86e8e3420ae by Wolthera van Hövell tot Westerflier.
Committed on 02/08/2019 at 10:33.
Pushed by woltherav into branch &apos;master&apos;.

This will allow for the date to be displayed as a localized format.

For bundles using the old format, Krita will convert these appropriately.

M  +2    -2    libs/ui/KisResourceBundle.cpp
M  +10   -2    plugins/extensions/resourcemanager/dlg_bundle_manager.cpp
M  +1    -1    plugins/extensions/resourcemanager/resourcemanager.cpp

https://invent.kde.org/kde/krita/commit/7fb302012a1ed54f9957d1549e71d86e8e3420ae</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872584</commentid>
    <comment_count>2</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2019-08-02 12:13:11 +0000</bug_when>
    <thetext>Git commit b582ead9ecf83a331f8c39b24dd47bd4e60f881d by Boudewijn Rempt, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 02/08/2019 at 12:12.
Pushed by rempt into branch &apos;krita/4.2&apos;.

This will allow for the date to be displayed as a localized format.

For bundles using the old format, Krita will convert these appropriately.

M  +2    -2    libs/ui/KisResourceBundle.cpp
M  +10   -2    plugins/extensions/resourcemanager/dlg_bundle_manager.cpp
M  +1    -1    plugins/extensions/resourcemanager/resourcemanager.cpp

https://invent.kde.org/kde/krita/commit/b582ead9ecf83a331f8c39b24dd47bd4e60f881d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>