I've got a problem I can't seem to fix at the moment. Maybe one of you guys are able to help me out. At least, I hope so 😉
I have this function to show a few timezones:
function timezones($hoursOffset){
echo gmdate("H:i", gmmktime(gmdate("H"),gmdate("i"),gmdate("s"),gmdate("m"),gmdate("d"),gmdate("Y"))+(3600*$hoursOffset));
}
Then I use the function like this:
<B>JST:</B> <?=timezones(9);?> |
<B>CET:</B> <?=timezones(1);?> |
<B>GMT:</B> <?=timezones(0);?> |
<B>EST:</B> <?=timezones(-5);?> |
<B>CST:</B> <?=timezones(-6);?> |
<B>PST:</B> <?=timezones(-8);?>
Problem is the winter- and summertimechanges. CET changed at the end of March, the US seemed to have changed one week later, and GMT doesn't change at all.
Problem is (at least here in CET) that winter- and summertime change depending on the moon or something like that.
Second problem is that I'm coding somewhat of a portal, and I can't force other users to change standard timezones within php with putenv() (since it requires safemode to be on, which not all servers have enabled).
One thing a friend reminded me off was making a 'portal time' which ofcourse is a good solution, but not good enough.
Anyone got a solution or tip for fixing the winter- and summertime changes?
Sincerely,
Jordi