1

Topic: Separate settings for server time zone and default time zone

The server on which I'm running PunBB runs on UTC, but all my users are Swedish. It's pretty annoying that if I set the time zone so that the times are shown correctly, all users will have to change the time zone setting when they register. Also, the vast majority of guests to the forum get times according to UTC rather than their own time zone.

So, I would really like PunBB to have both a server time zone setting, and a default time zone setting.

Re: Separate settings for server time zone and default time zone

That's probably a good idea. I'll put it on the never-shrinking list.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Separate settings for server time zone and default time zone

why not make punbb use gmdate, remove the server timezone setting and add the default timezone setting?

Re: Separate settings for server time zone and default time zone

I must admit, if there is one thing I just can't quite grasp, it's time zones. I would love a good explanation of what you just suggested actually entails smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Separate settings for server time zone and default time zone

ok, here goes (if this is wrong please someone shoot me smile)

date uses the server timezone, so atm you have to use the offset thing to make it turn it into the users date
gmdate always gives the time in the GMT+0 timezone so you just need to work out the users offset from that, and it can never be set wrong.

php.net wrote:

Identical to the date() function except that the time returned is Greenwich Mean Time (GMT). For example, when run in Finland (GMT +0200), the first line below prints "Jan 01 1998 00:00:00", while the second prints "Dec 31 1997 22:00:00".

6

Re: Separate settings for server time zone and default time zone

It would be cool indeed to separate date server (which is not necessary in the "GOOD time") and the GMT hour smile