Zen Cart Logo
Forums / Basic Configuration / Setting time zone on admin login page

Setting time zone on admin login page

Views: 1,555

Results 1 to 3 of 3
3 Apr 2017, 9:30 AM
#1
parseraider avatar

parseraider

New Zenner

Join Date:
Oct 2015
Location:
Port Lavaca, Texas USA
Posts:
29
Plugin Contributions:
0

Setting time zone on admin login page

PHP 5.5
zencart version v1.5.4

I had a problem with server and rep changed the php version and I started getting this warning:

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /xxxxxxx/local/home/xxxxxxxx/xxxxxxxxxxxxxxx/xxxxxx/xxxxxxxxxxxx/login.php on line 13 Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /xxxxxxx/local/home/xxxxxxxx/xxxxxxxxxxxxxxx/xxxxxx/xxxxxxxxxxxx/login.php on line 13

There is no time zone setting or "UTC" or anything in the whole login file.
Where can I change this to get rid of the warning?

Many thanks in advance.

3 Apr 2017, 10:08 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Setting time zone on admin login page

So technically your host should have this already addressed, then there is your php.ini and when all else fails you can set the timezone within the ZC files at: includes/extra_configures/set_time_zone.php

5 Apr 2017, 5:22 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Setting time zone on admin login page

This is already fixed in v1.5.5

But for your v1.5.4 site, do this:
Edit /admin/login.php and move the "application_top" line up to between lines 8-9, so that it becomes line 9.

See here: https://github.com/zencart/zencart/commit/7020d20cdf196251cb79e927e91dbf6ff23aae1d ... the red line got moved up to where the green line is.