Jump to content

Recommended Posts

Posted

When time is 21 O'clock in my country My server shows the time 9:30 AM

I Want to set my server time zone to GMT +3:30

Can some one do this for me or tell to me how i can do this?

Posted

@japapa where do you want to change the time is it in forum,cms or with time obtained from mysql or php.

Posted

I also want to see the server clock updated and syncronized, too. Johnny's clock is around 30 minutes off from UTC....

Posted

The time on both - Stevie and Johnny - are correct (except small issue with time in HTTP headers sent from Stevie being 24 seconds behind for some reason, while time served inside PHP scripts with date and time functions is correct).

 

Default timezone set on both servers is "America/Los_Angeles" - which is PST in winter and PDT in summer.

 

If you want to use different timezone you have to specify your own value either inside of your PHP scripts (in every one of them) with:

putenv("TZ=xyz");

or with:

date_default_timezone_set("xyz");

 

OR for all your scripts with using the following entry in .htaccess file:

SetEnv TZ xyz

 

where xyz will be selected timezone identifier. All timezones you can find in here:

http://php.net/manual/en/timezones.php

 

If I'm right then most probably best for you will be using "Asia/Tehran" timezone, as this is the place where GMT+03:30 (IRST) is used in winter, and GMT+04:30 (IRDT) in summer.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...