Jump to content

timezone setting


ginerjm

Recommended Posts

After moving to a dedicated server with my hoster, I have suddenly run across a time zone issue. Seems that the .ini file shows me as UTC, instead of 'America/New York'. Since I dont' have access the the master php.ini file I do have a set of little override files in all of my folders that up until this move worked just fine for me. Now however it appears that these little override files aren't being read. Is there some setting that my host needs to alter?

 

Second part of this question.

Why doesn't this line work:

 

ini_set('date.timezone','America/New York');

 

It doesn't like the line saying:

 

Warning: ini_set(): Invalid date.timezone value 'America/New York', we selected the timezone 'UTC' for now. in /home/albany/public_html/homejg/jg/check_ini_file.php on line 6

 

Is there some other syntax to use in ini_set?

 

PS - I'm running PHP 5.5.31

Link to comment
Share on other sites

date_default_timezone_set('America/New York');

 

http://php.net/manual/en/function.date-default-timezone-set.php  

 

The line you reference is for use in the actual php.ini. that you say you do not have access to. Per the manual re: date.timezone:

 

The behaviour of these functions is affected by settings in php.ini.

 

http://php.net/manual/en/datetime.configuration.php#ini.date.timezone

 

I dont' have access the the master php.ini file

 

You're on a dedicated server but you don't have root access?

Edited by benanamen
Link to comment
Share on other sites

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.