Jump to content

Recommended Posts

yip, and when I tested it it worked for me (I am in the uk right enough...).

 

 

did you try it?

 

Also, where exactly do you think the script is getting it's time zone settings anyway? It's not going off to some NTS and pulling GMT out just to mess with you, it takes the time zone setting as whatever you set it as in the php.ini file.

You can set the script timezone like so:

 

date_default_timezone_set('America/Toronto');

$timezone = date_default_timezone_get();

echo date('c');

 

Or you can change your timezone directly in your php.ini which will affect all scripts.

 

See: http://php.net/manual/en/function.date-default-timezone-set.php and List of Supported Timezones

Try not using short open tags, and using gmdate instead of date :

gmdate('H', $min);

 

gmdate() isn't what's needed here: "Identical to the date() function except that the time returned is Greenwich Mean Time (GMT)."

gmdate() isn't what's needed here: "Identical to the date() function except that the time returned is Greenwich Mean Time (GMT)."

I only suggested it because when I tested it on y dev server date() was returing system time +1H, gmdate() returned the actual system time.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.