How to change the time


#1

Hello, I’m European and I use PHP to display the actual date in my website. But the time is wrong for my country, because when in USA it’s 12 o’clock, in my country is 21’00. So the date doesn’t work properly.

What can I do? How can I change the date of PHP??
Thanks


#2

gmdate() instead of date().
Or use mktime

If you are getting the date/time from a mysql database (for news articles for example) You can use the Mysql function addtime


#3

Thanks!!! I will try it!