待辦事項 #33264

Message dates display in (apparently) UTC

啟用日期: 2014-02-27 03:15 最後更新: 2014-03-12 21:44

回報者:
負責人:
類型:
狀態:
開啟 [Owner assigned]
元件:
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
3
處理結果:
檔案:

細節

When using Tenfourbird, lately all the messages in the message list display their 'Date' field in the wrong time. This time appears to be UTC although I have not diligently checked. However, it is 7 or 8 hours off from my system time zone, America/Los_Angeles. OS X 10.5.8, Tenfourbird 24.3.0 for PPC 7450 on a Powerbook G4.

Thank you for all your effort in maintaining Tenfourbird, it is really useful for PPC users.

Ticket History (3/6 Histories)

2014-02-27 03:15 Updated by: gmorehou
  • New Ticket "Message dates display in (apparently) UTC" created
2014-03-02 21:34 Updated by: t_mrc-ct
  • 負責人 Update from (無) to t_mrc-ct
評語

The following web page may help you: http://kb.mozillazine.org/Time_and_time_zone_settings

Check System's locale

To detect your system locale, please run the following commands on Terminal app (/Applications/Utilities/Terminal)

  1. date
  2. locale

If date command output is not local time, system locale is something wrong.

If date command output is local time properly, Tenfourbird is doing something wrong.

Check Tenfourbird's locale

Can you run the following commands on Tenfourbird's Error Console? (Tools > Error Console).

  1. Date()

and

  1. (new Date()).toUTCString()

The first command will display local time. second will display UTC time.

If you using TenFourFox, please check above commands on TenFourFox's Web Console (Tools > Web Developer > Web Console). This may help to detect where this bug comes from.

Regards.

2014-03-03 09:59 Updated by: gmorehou
評語

Hi there,

'date' does display the correct date and time zone.

'locale' displays the following:

$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

I went ahead and ran both commands you requested in both programs. Here are the results:

Tenfourbird 24.3.0:
-------------------

Date():
Mon Mar 03 2014 00:52:06 GMT+0000 (UTC)

(new Date()).toUTCString():
Mon, 03 Mar 2014 00:52:34 GMT

TenFourFox 24.3.0:
------------------

Date():
"Sun Mar 02 2014 16:54:44 GMT-0800 (PST)"

(new Date()).toUTCString():
"Mon, 03 Mar 2014 00:55:17 GMT"
2014-03-04 00:00 Updated by: t_mrc-ct
評語

Thank you for testing.

Your result is suggested Tenfourbird has timezone related bug.

I need more information to find out cause of this bug.

Can you check the following?:

Is this bug specific to v24.3.0?

Is this bug also happened on other versions of Tenfourbird? (17.0.11, 24.2.0, etc...)

$TZ affected Tenfourbird?

Local timezone is changeable by environment variable TZ. So I want to check TZ variable on Tenfourbird.

Please run the following command on Tenfourbird's Error Console:

  1. Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).exist("TZ")

If above command returns true, please also run the following command and check result:

  1. Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).get("TZ")

Please run these commands on TenFourFox's Browser Console (Tools > Web Developer > Browser Console). (These commands are not runnable on Web Console)

Thanks.

2014-03-11 10:41 Updated by: gmorehou
評語

I have not had a chance to install older versions yet (is it possible to do so without overwriting settings on my existing installation)? However, for Tenfourbird 24.3.0 in error console:

I run Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).exist("TZ")

And I get:

Error: TypeError: Components.classes['@mozilla.org/process/environment;1'].getService(...).exist is not a function
Source File: javascript:%20Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nslEnvironment).exist("TZ")

And when I run Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).get("TZ")

I get: UTC

For Tenfourfox when I run the first command in Browser Console (24.3.0) I get the same result as above, "foobar.exist is not a function."

When I run the second command, Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).get("TZ") I get an empty string "" as the result.

I have also noticed some time-related problems with Enigmail. Sometimes if you tell it to leave the key in memory for a few minutes, if the computer goes to sleep it will keep the key in memory for many hours. This is obviously bad. I don't know if it is related and haven't been able to 100% reproduce it, but let me know if you would like me to open a ticket so we can investigate.

2014-03-12 21:44 Updated by: t_mrc-ct
  • 元件 Update from (無) to Tenfourbird
評語

Oops.., I mistook the command spell...

Proper command is:

  1. Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment).exists("TZ")

But your test result will already reveal cause of this problem.

For some reason, Tenfourbird are affected by the environ variable TZ. But, TenFourFox is not affected. This is a mystery...

But there are possibilities:

Do you using Auto startup?

Do you startup Tenfourbird by automatical way? (Login Items, launcher app or any script, etc...)

LSEnvironment is specified in Info.plist?

LSEnvironment key in the Info.plist is another way of setting TZ.

How to check LSEnvironment key:

By Finder

  1. Show Tenfourbird context menu and select Show Package Contents
  2. Open Contents/Info.plist
  3. On Property List Editor, check LSEnvironment key is exists.

By Terminal

Execute the following command in Terminal (If you install Tenfourbird at /Applications)

  1. cat /Applications/Tenfourbird.app/Contents/Info.plist | grep -e LSEnvironment

Thanks.

Attachment File List

No attachments

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入