PDA

View Full Version : My first one - the standards/cities of timezone display


Stoned Gecko
09 Feb 2002, 00:11
Preface:
I wanted to display the actual timezone text on the forum in addition to the GMT offset. Since I couldn't find anything here, I did it myself. Now I'm sure there is an easier way of doing this, however I have never touched PHP before. So this is the only way I could figure out how to do this. However since I managed to do it, I thought I'd share it :).

What it does:
This basically creates a $timezonetext variable that can be used in templates. The variable contains the text for the appropriate timezone the user selected. For example if the user selected GMT -8, $timezone would contain "US/Pacific Time (US & Canada)".

What it looks like:
The contents of the timezone template:
http://forums.sygatetech.com/tzhack/tztemp.gif

The text generated by that (sorry, live demo is not up yet :))
http://forums.sygatetech.com/tzhack/tzss.gif


What to do:

Edit global.php. Find this text:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Then right below that add this:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Hope someone finds this usefull besides me. :D

LuBi
10 Feb 2002, 03:09
Sounds good, have an ss?

Stoned Gecko
10 Feb 2002, 03:40
What's an SS? :confused:

Floris
10 Feb 2002, 10:58
SS (ScreenShot)

Stoned Gecko
13 Feb 2002, 02:53
Sorry for the lag. Screen shots are on the top post.