mattura
Member
- Messages
- 570
- Reaction score
- 2
- Points
- 18
Hi
I want to have a different timezone in my php Date function (with daylight saving time)
I have seen many solutions on the web which say:
[FONT=courier,monospace]
putenv("TZ=US/Eastern");
This function has, however been disabled (maybe it is enabled in the level 3 php, but I'd feel silly asking for php level 3 just for that...
Is there a soft-code way to do it (bearing in mind daylight savings time, I can't just add/subtract hours)?
Thanks in advance
[/FONT]
Edit:
Never mind, I found the answer:
Just put this in your php:
date_default_timezone_set('GMT');
or 'GB' for Great Britain's timezone
or whatever country's timezone you want (it adjusts for DST)
I want to have a different timezone in my php Date function (with daylight saving time)
I have seen many solutions on the web which say:
[FONT=courier,monospace]
putenv("TZ=US/Eastern");
This function has, however been disabled (maybe it is enabled in the level 3 php, but I'd feel silly asking for php level 3 just for that...
Is there a soft-code way to do it (bearing in mind daylight savings time, I can't just add/subtract hours)?
Thanks in advance
[/FONT]
Edit:
Never mind, I found the answer:
Just put this in your php:
date_default_timezone_set('GMT');
or 'GB' for Great Britain's timezone
or whatever country's timezone you want (it adjusts for DST)
Last edited: