[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Time formats / LC_TIME challenge for 4-digit year support
From:       Jaroslaw Staniek <staniek () kde ! org>
Date:       2018-12-04 19:42:41
Message-ID: CAOj7QQ1ahYwr4POUXkPQjMzJiPrv+KEw9-DLUMo+5zVhxqzYWw () mail ! gmail ! com
[Download RAW message or body]

On Tue, 4 Dec 2018 at 20:10, Albert Astals Cid <aacid@kde.org> wrote:

> El dilluns, 3 de desembre de 2018, a les 14:47:56 CET, Jaroslaw Staniek va
> escriure:
> > Hello,
> > The need: 4-digit year support for short date formats to avoid issues
> like
> > "10/11/12" dates.
> 
> What's wrong with 10/11/12 ?
> 

It's a problem. Year 2000 problem.

> 
> > This is just my initial conclusion from for the Qt date format issue:
> > 
> > 
> https://bugreports.qt.io/browse/QTBUG-59382?focusedCommentId=436861&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-436861
> 
> > lt;dr: KF5 context: KCallendarSystem is part of the old APIs and the only
> > code I found related to LC_TIME.
> > 
> > So I've not found any common code KDE app can use instead of hard coding
> > some internal logic in order to support non-Plasma environments and/or
> > non-global settings. Basically even if an app implements locale name
> > selection in its private settings, "pure" Qt code is not enough to
> support
> > it in the discussed cases. Users may need alter date format globally (for
> > all apps) by hand using environment's settings, setting e.g. yyyy-mm-dd.
> Or
> > app developers may add private setting for that, one per app.
> > 
> > Opinions welcome.
> 
> I am not sure i understand your email/problem.
> 
> As far as i read this email your concern is:
> * localized dates use the locale date format
> * locale date format is "wrong".


Yes. "Opinions welcome" mostly meant sending "do you have this kind of
issues in your apps" question to app developers who happen to use KF5+Qt.


> 
> So the two options are:
> a) User changes their locale
> 
 b) Apps don't use localized dates and use a custom format.
> 
> Am I understanding your email correctly?
> 

Yes, I discussed pros and cons of a) and b).

Doing a) means the user changing global locale is responsible for finding
locale that matches format which Qt implements as expected (if not, that's
rare problem but unfortunately happened for the ISO format explained in the
Qt ticket). And possibly, finding format that won't break non-Qt apps that
may use different locale infra.
Or if the user changes the format by hand, but still does so in the system
locale settings, she's more in control as this is a global setting, not
per-app.

b) Has pros and cons but cons can be reduced by this option being opt-in
and default coming from the locale.

I did not know there are such differences for the locale system. But by no
means my email is a call to "patch" the Qt-level problem by having a KF5
solution. And I am skeptical if Qt can be patched in version 5 with such
incompatible change. Hopefully these poor man analysis help some other app
developers :)

-- 
regards, Jaroslaw Staniek

KDE:
> A world-wide network of software engineers, artists, writers, translators
> and facilitators committed to Free Software development - kde.org
KEXI:
> A visual database apps builder - kexi-project.org calligra.org/kexi
  twitter.com/kexi_project facebook.com/kexi.project t.me/kexi_project
Qt Certified Specialist:
> linkedin.com/in/jstaniek <http://www.linkedin.com/in/jstaniek>


[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_default" \
style="font-family:monospace,monospace;font-size:small"><br></div><br><div \
class="gmail_quote"><div dir="ltr">On Tue, 4 Dec 2018 at 20:10, Albert Astals Cid \
&lt;<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">El dilluns, 3 de desembre de 2018, \
a les 14:47:56 CET, Jaroslaw Staniek va escriure:<br> &gt; Hello,<br>
&gt; The need: 4-digit year support for short date formats to avoid issues like<br>
&gt; &quot;10/11/12&quot; dates.<br>
<br>
What&#39;s wrong with 10/11/12 ?<br></blockquote><div><br></div><div \
class="gmail_default" \
style="font-family:monospace,monospace;font-size:small">It&#39;s a problem. Year 2000 \
problem.</div><div class="gmail_default" \
style="font-family:monospace,monospace;font-size:small"><br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> &gt; <br>
&gt; This is just my initial conclusion from for the Qt date format issue:<br>
&gt; <br>
&gt; <a href="https://bugreports.qt.io/browse/QTBUG-59382?focusedCommentId=436861&amp; \
page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-436861" \
rel="noreferrer" target="_blank">https://bugreports.qt.io/browse/QTBUG-59382?focusedCo \
mmentId=436861&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-436861</a><br>
 &gt; lt;dr: KF5 context: KCallendarSystem is part of the old APIs and the only<br>
&gt; code I found related to LC_TIME.<br>
&gt; <br>
&gt; So I&#39;ve not found any common code KDE app can use instead of hard coding<br>
&gt; some internal logic in order to support non-Plasma environments and/or<br>
&gt; non-global settings. Basically even if an app implements locale name<br>
&gt; selection in its private settings, &quot;pure&quot; Qt code is not enough to \
support<br> &gt; it in the discussed cases. Users may need alter date format globally \
(for<br> &gt; all apps) by hand using environment&#39;s settings, setting e.g. \
yyyy-mm-dd. Or<br> &gt; app developers may add private setting for that, one per \
app.<br> &gt; <br>
&gt; Opinions welcome.<br>
<br>
I am not sure i understand your email/problem.<br>
<br>
As far as i read this email your concern is:<br>
  * localized dates use the locale date format<br>
  * locale date format is &quot;wrong&quot;.  </blockquote><div><br></div><div><div \
class="gmail_default" style="font-family:monospace,monospace;font-size:small">Yes. \
&quot;Opinions welcome&quot; mostly meant sending &quot;do you have this kind of \
issues in your apps&quot; question to app developers who happen to use \
KF5+Qt.</div></div><div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
So the two options are:<br>
  a) User changes their locale<br></blockquote><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  b) Apps \
don&#39;t use localized dates and use a custom format.<br> <br>
Am I understanding your email correctly?<br></blockquote><div><br></div><div \
class="gmail_default" style="font-family:monospace,monospace;font-size:small">Yes, I \
discussed pros and cons of a) and b).</div><div class="gmail_default" \
style="font-family:monospace,monospace;font-size:small"><br></div><div \
class="gmail_default" style="font-family:monospace,monospace;font-size:small">Doing \
a) means the user changing global locale is responsible for finding locale that \
matches format which Qt implements as expected (if not, that&#39;s rare problem but \
unfortunately happened for the ISO format explained in the Qt ticket). And possibly, \
finding format that won&#39;t break non-Qt apps that may use different locale infra.  \
</div><div class="gmail_default" \
style="font-family:monospace,monospace;font-size:small">Or if the user changes the \
format by hand, but still does so in the system locale settings, she&#39;s more in \
control as this is a global setting, not per-app.</div><div class="gmail_default" \
style="font-family:monospace,monospace;font-size:small"><br></div><div \
class="gmail_default" style="font-family:monospace,monospace;font-size:small">b) Has \
pros and cons but cons can be reduced by this option being opt-in and default coming \
from the locale.</div><div class="gmail_default" \
style="font-family:monospace,monospace;font-size:small"><br></div><div \
class="gmail_default" style="font-family:monospace,monospace;font-size:small">I did \
not know there are such differences for the locale system. But by no means my email \
is a call to &quot;patch&quot; the Qt-level problem by having a KF5 solution. And I \
am skeptical if Qt can be patched in version 5 with such incompatible change. \
Hopefully these poor man analysis help some other app developers \
:)</div></div><div><br></div>-- <br><div dir="ltr" \
class="m_-8576459193063101679gmail_signature" data-smartmail="gmail_signature"><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>regards, \
Jaroslaw Staniek<br><br>KDE:<br>: A world-wide network of software engineers, \
artists, writers, translators<br>: and facilitators committed to Free Software \
development - <a href="http://kde.org" target="_blank">kde.org</a><br>KEXI:<br>: A \
visual database apps builder -  <a href="http://kexi-project.org/" \
target="_blank">kexi-project.org</a>  <a href="http://calligra.org/kexi" \
target="_blank">calligra.org/kexi</a></div><div>    <a \
href="https://twitter.com/kexi_project" target="_blank">twitter.com/kexi_project</a>  \
<a href="https://facebook.com/kexi.project" \
target="_blank">facebook.com/kexi.project</a>  <a href="https://t.me/kexi_project" \
target="_blank">t.me/kexi_project</a><br>Qt Certified Specialist:<br>: <a \
href="http://www.linkedin.com/in/jstaniek" \
target="_blank">linkedin.com/in/jstaniek</a></div></div></div></div></div></div></div></div></div></div>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic