GitHub user sebbASF opened an issue:

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

    Bug: ponymail.js/formatDate may show the wrong timezone

    The function formatDate attempts to show the local timezone corresponding 
to a date.
    
    However it uses the current timezone, rather than the tz that was in effect 
for the date.
    This won't be noticed for recent messages (except around TZ changes) but 
will occur for historic mails.
    
    For example:
    
    
https://lists.apache.org/api/source.lua/9fd77b14753bbde462bea06fc2e1c03d5cf5a89cea2fabd6751d805a@%3Cdev.ponymail.apache.org%3E
    The source has:
    Date: Wed, 13 Jul 2016 13:46:39 +0200
    
    The mbox entry
    
https://lists.apache.org/api/email.lua?id=9fd77b14753bbde462bea06fc2e1c03d5cf5a89cea2fabd6751d805a@%3Cdev.ponymail.apache.org%3E
    has the following:
    
    "date":"2016\/07\/13 11:46:39",
    "epoch":1468410399
    The epoch translates as 2016-07-13 11:46:39 UTC
    
    However it currently (Dec 2016) displays on my system as:
    2016-07-13 12:46 (-0000)
    
    That's because it is currently on GMT whereas in July it would have been on 
BST (GMT + 0100)
    The display should be:
    
    2016-07-13 12:46 (+0100)
    
    Or should it?
    
    The actual time of the email was 13:46:39 +0200.
    Does it make sense to re-interpret the email date in terms of a different 
TZ?
    
    I'm not sure it does, in which case it would make more sense to use UTC:
    2016-07-13 11:46 (UTC)
    
    This would also be simpler to do.
    
    Note: the ES mbox data currently does not include the original Date: as per 
the source, only the converted versions, so it's not possible to show the date 
in its original TZ.
    
    


----

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to