Time display on forum is incorrect

Need the mods or admins to do something for you? Post here. Read the "About" post first.

Moderators: Moderators General, Prelates, Magistrates

User avatar
ConMan
Shepherd's Pie?
Posts: 1690
Joined: Tue Jan 01, 2008 11:56 am UTC
Location: Beacon Alpha

Time display on forum is incorrect

Postby ConMan » Fri Jun 29, 2012 4:03 am UTC

I suspect this gets filed under "Stupid things PHPBB does" (or maybe just "Stupid things prosilver does"), but anyway ...

The time I see on posts is definitely local time, but it always has "UTC" attached to the end. Given that I'm currently in UTC+10, that's pretty far off being right. So can the "UTC" be removed?
pollywog wrote:
Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.
I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.

User avatar
Adacore
Posts: 2755
Joined: Fri Feb 20, 2009 12:35 pm UTC
Location: 한국 창원

Re: Time display on forum is incorrect

Postby Adacore » Fri Jun 29, 2012 4:14 am UTC

It also says, in the bottom right corner of every page, "All times are UTC", regardless of what time zone I set in my profile.

EDIT: No wait, It updates, but only after you navigate off the page that says 'your preferences have been updated'. I assumed it would change on that page if it was going to. Never mind me. :oops:

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Time display on forum is incorrect

Postby gmalivuk » Fri Jun 29, 2012 4:32 am UTC

ConMan wrote:So can the "UTC" be removed?
Change your board preferences.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
TheGrammarBolshevik
Posts: 4878
Joined: Mon Jun 30, 2008 2:12 am UTC
Location: Going to and fro in the earth, and walking up and down in it.

Re: Time display on forum is incorrect

Postby TheGrammarBolshevik » Fri Jun 29, 2012 4:41 am UTC

More specifically, go here.

Where it says "My date format," "Custom" is probably selected, and the box says "D M d, Y g:i a e." Get rid of the 'e' at the end.
Nothing rhymes with orange,
Not even sporange.

User avatar
ConMan
Shepherd's Pie?
Posts: 1690
Joined: Tue Jan 01, 2008 11:56 am UTC
Location: Beacon Alpha

Re: Time display on forum is incorrect

Postby ConMan » Fri Jun 29, 2012 4:57 am UTC

TheGrammarBolshevik wrote:More specifically, go here.

Where it says "My date format," "Custom" is probably selected, and the box says "D M d, Y g:i a e." Get rid of the 'e' at the end.

That's seriously what's causing the problem? Wow. That'll teach me to not learn the PHP date standard. Or look up just what those things in the date field actually stand for.
pollywog wrote:
Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.
I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.

User avatar
Adacore
Posts: 2755
Joined: Fri Feb 20, 2009 12:35 pm UTC
Location: 한국 창원

Re: Time display on forum is incorrect

Postby Adacore » Fri Jun 29, 2012 5:03 am UTC

Well, theoretically, an 'e' or 'T' should give something other than UTC/GMT if you change your timezone settings, I'd think. But I guess the forum isn't clever enough to feed that through to the PHP Date stuff.

User avatar
davean
Site Ninja
Posts: 2498
Joined: Sat Apr 08, 2006 7:50 am UTC
Contact:

Re: Time display on forum is incorrect

Postby davean » Fri Jun 29, 2012 5:57 pm UTC

Adacore wrote:Well, theoretically, an 'e' or 'T' should give something other than UTC/GMT if you change your timezone settings, I'd think. But I guess the forum isn't clever enough to feed that through to the PHP Date stuff.


I've never cared enough to look into that specifically but it is a sort of annoying issue that keeps coming up. I would guess it is a phpbb issue from what I have looked into though.

User avatar
phlip
Restorer of Worlds
Posts: 7572
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Time display on forum is incorrect

Postby phlip » Sun Jul 01, 2012 9:53 am UTC

PHP's date processing tools were, for the longest time, very limited. You can show a time in (a) UTC, or (b) the server's local timezone, but that's it. If you want to do any other timezones, you have to do the processing yourself. What phpBB does is just add the appropriate timezone offset to the date and then run it through the normal gmdate() function. So, for instance, when it's showing a time for me, it's not figuring out "What time is this in UTC+10?" but rather "What time is it 10 hours after this, in UTC?"... which is mostly the same answer, but it isn't ideal (it's wrong when it comes to daylight savings for instance, and the date function will report the wrong timezone). Newer versions of PHP support more thorough timezone handling, however phpBB still officially supports older versions of PHP, so they can't rely on those new features.

Or, as I've phrased it before: PHP sucked, so phpBB had to also suck in the opposite direction to compensate, and proper timezones were lost in the crossfire.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]


Return to “Site/Forum issues”

Who is online

Users browsing this forum: No registered users and 4 guests