Ad Widget

Collapse

changed the /etc/localtime file, getting unrecovery timezone errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tfqzab
    Member
    • Apr 2011
    • 51

    #1

    changed the /etc/localtime file, getting unrecovery timezone errors

    Hi, i am using zabbix appliance 2.0.2 vmx,
    i replaced /etc/localtime with /usr/share/zoneinfo/Asia/Shanghai, and found i can't get the web page, it shows the error:

    date(): 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 'Europe/Helsinki' for 'EEST/3.0/DST' instead [include/page_header.php:184]

    thought i was smart that i backup the original localtime file before i replaced it, but i am disgusted that after i roll back the original localtime file and reboot the server,i still can't get the web page with the same erorr aboving showed.

    could anyone help me ? Thanks a lot.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    I think the error is suggesting to set timezone for PHP:
    Code:
    # grep timezone /etc/php.ini
    ; Defines the default timezone used by the date functions
    ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
    date.timezone = Europe/Berlin

    Comment

    • tfqzab
      Member
      • Apr 2011
      • 51

      #3
      problem solved

      Thanks a lot, BDiE8VNy.
      I got it. when i replaced the /etc/localtime file , i use
      mv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
      which I'd use "copy" instead. Then the timezone file in /zoneinfo missed. so whatever i correct the datetime.zone vlaue, i still get problem.

      a stupid mistake.

      Comment

      Working...