Timezones in PHP4

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cirdan
Forum Contributor
Posts: 144
Joined: Sat Nov 01, 2008 3:20 pm

Timezones in PHP4

Post by Cirdan »

So what is the best way to handle timezones in PHP4. Trust me, I tried to get the admin to switch hosts to get PHP5 but no avail.

I saw this article. But I can't really understand their code. Also, is there a different way instead of brute forcing it? I would like to do it similar to how PHPBB does it.

Working URLs for the above article:
timezones_php4.php
time.php
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Timezones in PHP4

Post by it2051229 »

you can set also the time zone via .htaccess (just a suggestion)
Cirdan
Forum Contributor
Posts: 144
Joined: Sat Nov 01, 2008 3:20 pm

Re: Timezones in PHP4

Post by Cirdan »

Since there seems to be no feasible way to do this, I will probably just have the users enter the current time, and it will calculate the offset automatically. They will just have to change it when it is DST.
Post Reply