Opened 10 years ago

Last modified 10 years ago

#1246 closed defect (Fixed)

Torbutton changes Indian Standard Time timezone in firefox

Reported by: reddox Owned by:
Priority: High Milestone:
Component: Applications/Torbutton Version: 0.2.1.22
Severity: Keywords:
Cc: reddox, arma, mikeperry Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hey,

I'm using Ubuntu 9.10. In my firefox, when I type "javascript:new%20Date()" in the address bar and hit enter,
I get: Wed Feb 10 2010 22:32:05 GMT+0500 (IST)
when I should get: Wed Feb 10 2010 23:02:05 GMT+0530 (IST)

I have isolated the problem to the installation of the torbutton. After this addon is installed, the timezone changes to +0500. Uninstalling this addon does not change this.
Please help.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Attachments (1)

torbutton-1.2.5pre2.xpi (421.8 KB) - added by mikeperry 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by mikeperry

Hrmm. Torbutton should be handling this case. What does the call (new Date()).getTimezoneOffset() give you?

comment:2 Changed 10 years ago by mikeperry

Without torbutton, I meant.

comment:3 Changed 10 years ago by reddox

@Mike: Typing javascript:(new Date()).getTimezoneOffset() in Firefox (without torbutton), I get "-330".

comment:4 Changed 10 years ago by mikeperry

Hrmm. It should be calculating the correct offset. Perhaps the TZ variable is not being parsed correctly
by Ubuntu's glibc..

Can you go enter about:config in the Firefox url bar, and filter for "tz_string", and tell me the value of
extensions.torbutton.tz_string while the Torbutton addon is installed?

Once you have this, if you could also open a shell terminal and type:

TZ="IST-5:30" date

and see if it gives you the correct time? Assuming it actually calculated "IST-5:30" for the
extensions.torbutton.tz_string value. If not, use the string from there.

comment:5 Changed 10 years ago by reddox

Value in about:config:

IST-05.5:30

Using this string along with Date in the terminal displays the same incorrect time (slower by 30 minutes).

Changed 10 years ago by mikeperry

Attachment: torbutton-1.2.5pre2.xpi added

comment:6 Changed 10 years ago by mikeperry

Ah, ok. I know what's wrong. I was expecting Javascript to truncate integer division. It converts it into floats
instead!

The torbutton-1.2.5pre2.xpi in the attachments tab should fix the issue, I think. Let me know if it doesn't.

comment:7 Changed 10 years ago by reddox

Works! Thanks!

comment:8 Changed 10 years ago by mikeperry

flyspray2trac: bug closed.
Fix will appear in 1.2.5.

Note: See TracTickets for help on using tickets.