You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ponymail.apache.org by sebbASF <gi...@git.apache.org> on 2016/06/13 10:56:44 UTC

[GitHub] incubator-ponymail issue #86: Bug: stored date uses locale-dependent convers...

GitHub user sebbASF opened an issue:

    https://github.com/apache/incubator-ponymail/issues/86

    Bug: stored date uses locale-dependent conversion and is ambiguous

    The archiver.py script converts [1] the message date to a local time, as follows:
    
    mdatestring = time.strftime("%Y/%m/%d %H:%M:%S", time.localtime(email.utils.mktime_tz(mdate)))
    
    Note that this string does not contain the timezone, so its value is ambiguous, and will depend on the locale that was in force when the conversion was done.
    
    Furthermore, many time zones implement DST. Once a year, there will be a period of an hour when the time is repeated.
    
    E.g. it is not possible to know whether 01:30 on the changeover date is summer or winter time unless the TZ details are included in the timestamp string.
    
    The database should only store times using UTC.
    If there is good reason for storing times as local time then the string must include the TZ (%Z or %z).
    
    [1] https://github.com/apache/incubator-ponymail/blob/master/tools/archiver.py#L305


----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #86: Bug: stored date uses locale-dependent convers...

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/86
  
    Changed to use gmtime in:
    https://github.com/apache/incubator-ponymail/commit/f6f453efa6a2565d53519254068beb180b786511#diff-0a6a382add50f53c469e2288971c1b6a


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #86: Bug: stored date uses locale-dependent convers...

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/86
  
    I think this is now fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #86: Bug: stored date uses locale-dependent convers...

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF closed the issue at:

    https://github.com/apache/incubator-ponymail/issues/86


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---