PDA

View Full Version : [fixed] Minor flaw in displaying the time


Fusion
Wed 7th Nov '01, 7:27am
If a new user in 2.2.0 picks a TZ other than GMT, it'll be off by X hours either way. When displaying that, however, vB doesn't currently show if the time is east or west of GMT, ie. + or -, respectively.

Example: All times are GMT 1 hour. The time now is 12:15. Should've read +1.

As I said, minor, but potentially confusing. ;)

tubedogg
Thu 8th Nov '01, 12:09am
Where is this? It shows correctly for me...

Fusion
Thu 8th Nov '01, 2:58am
Where? Everywhere. Seems it's linked to the TZ field. It'll work if you're west of GMT, because then it'll store a negative number, but for the eastern users it stores a positive number. The problem is that the code that does the TZ-selection needs to have a check on positive numbers and make sure a '+' is added as a prefix to the TZ field.

Fusion
Fri 9th Nov '01, 2:35am
bump

tubedogg
Sat 10th Nov '01, 5:28am
I just tested this and it works perfectly everywhere on the board for me. I set mine to GMT +5 and this is what I saw everywhere:All times are GMT +5 hours. The time now is 02:24 PM.

Fusion
Sat 10th Nov '01, 6:33pm
Originally posted by tubedogg
I just tested this and it works perfectly everywhere on the board for me. I set mine to GMT +5 and this is what I saw everywhere:

tube, does your Admin CP say 5 or +5 for your own userfile? When I checked mine after spotting this thing, it said just 1, and as previously stated, adding a + "fixed" it.

tubedogg
Sun 11th Nov '01, 2:11am
The Admin CP user record for me on our beta board (not this one as I don't have access to the ACP for it) says +5 when I change my timezone through my User CP to GMT +5. It says -5 when I go through the User CP and set it to GMT -5. Everywhere it says +5 for me, or -5 when I have it set that way.

Fusion
Sun 11th Nov '01, 11:58am
Ick. On my newly installed 2.2.0 it drops the + on positive #. Is there a difference between the beta-board and the release-version of 2.2.0? If not, I'm really at a loss.

tubedogg
Mon 12th Nov '01, 2:36am
Not any differences that would affect this, sorry.

Fusion
Mon 12th Nov '01, 3:50am
Any suggestions where to look for the cause? is the database corrupt? I'm not into using any hacks, so if it's not the vB, what then? This isn't really critical, but it can be annoying. :rolleyes:

Fusion
Mon 19th Nov '01, 9:53am
Tubedogg or anyone, please attempt to verify this.. Running 2.2.0 my newly registered users who pick GMT+1 as their TZ, get '1' saved in the TZ data-field, thus creating the flaw described earlier. Going to the User CP and changing time-zones to anything, eg GMT then back to GMT+1, correctly saves '+1'. :confused:

tubedogg
Mon 19th Nov '01, 12:29pm
Hmm...Would appear that you are correct however this only happens at registration.

Moving to bugs...

Fusion
Mon 19th Nov '01, 3:41pm
Yep. that's what threw me initially.

John
Mon 19th Nov '01, 5:49pm
Remove this line from register.php, 335:


$timezoneoffset=intval($timezoneoffset);

John

Fusion
Mon 19th Nov '01, 6:12pm
Thanks, John.