|Summary:||mail/thunderbird: TOC time off by 2 hours when DST is in effect|
|Product:||Ports & Packages||Reporter:||Craig Leres <leres>|
|Component:||Individual Port(s)||Assignee:||freebsd-gecko (Nobody) <gecko>|
|Severity:||Affects Only Me||CC:||ale, lapo|
Description Craig Leres 2019-04-12 22:59:17 UTC
Created attachment 203628 [details] 9:18 am message show as 7:18 For some time now I've noticed that the displayed message time sometimes differs between the TOC and message itself. I am able to reproduce using a thunderbird package from pkg.freebsd.org but does not happen under windows 10. My theory is that the code is subtracting instead of adding an hour. I tested this by setting the system time back before DST took effect and the problem went away. I took a stab at finding the place where TOC date formatting occurs but thunderbird is just too big for someone who doesn't work on it. I'll attach a couple of screen grabs that show the problem.
Comment 1 Craig Leres 2019-04-12 23:00:15 UTC
Created attachment 203629 [details] 10:40pm message shown as 8:40pm
Comment 2 Jan Beich 2019-04-13 00:31:24 UTC
(In reply to Craig Leres from comment #0) > My theory is that the code is subtracting instead of adding an > hour. I tested this by setting the system time back before DST took > effect and the problem went away. DST adjusts 1 hour but the screenshot show discrepancy in 2 hours. Does it also occur with "TZ=UTC thunderbird"? > I took a stab at finding the place where TOC date formatting occurs > but thunderbird is just too big for someone who doesn't work on it. Code specific to Thunderbird is under comm/mail/, code shared with SeaMonkey is under comm/mailnews/, code shared with Firefox is outside of comm/.
Comment 3 Craig Leres 2019-04-13 00:39:49 UTC
(In reply to Jan Beich from comment #2) > Does it also occur with "TZ=UTC thunderbird"? It works correctly with "env TZ=UTC thunderbird"
Comment 4 Craig Leres 2019-04-13 03:51:22 UTC
Comment 5 Alex Dupre 2019-09-16 16:32:55 UTC
I've just switched from seamonkey to thunderbird and I have the same issue: UTC dates in the messages list, while correct date in the top right of the message pane. Are you sure it worked well without DST? I haven't tried without DST, so it's not clear if the issue is that the hour is substracted instead of added (weird), or simply that it cannot parse the timezone (in particular the CEST abbreviation) and so fallback to UTC.
Comment 6 Alex Dupre 2019-09-17 12:46:43 UTC
If I start it with "env TZ=Europe/Rome /usr/local/lib/thunderbird/thunderbird" the dates in the message list are correct. Apparently having the correct /etc/localtime and /var/db/zoneinfo files is not enough.
Comment 7 Alex Dupre 2019-09-17 13:11:17 UTC
My fix/workaround was to add `:timezone=Europe/Rome:` to my .login_conf file in order to set the TZ variable. This change had a positive impact also on Chrome. Before: > (new Date()).getTimezoneOffset() < 0 > Intl.DateTimeFormat().resolvedOptions().timezone < CEST After: > (new Date()).getTimezoneOffset() < -120 > Intl.DateTimeFormat().resolvedOptions().timezone < "Europe/Rome" I'm aware of other people that haven't the TZ variable and neither this issue (with same /etc/localtime as me), so there must be something else that interfere.