Subscribe

Timezone identifier error

  1. 2008-12-13 05:29:19 PST
    I am running phpMyAdmin locally on a Fedora 8 PC
    I have created a config folder and attempted to begin the set up process but straight away I have got an error message -

    ********************************************************
    Runtime Notice in ./libraries/common.inc.php#272
    date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Australia/Melbourne' for 'EST/11.0/DST' instead

    Backtrace

    ./libraries/common.inc.php#272: date_default_timezone_get()
    ./setup/lib/common.inc.php#18: require_once(./libraries/common.inc.php)
    ./setup/index.php#12: require(./setup/lib/common.inc.php)
    *******************************************************

    I suspect it to be more of a PHP error than a phpMyAdmin error but if anyone has seen this error before and give me a link to a fix I'll be very grateful. I checked etc/php.ini and the time/date zone was empty

    ***************
    [Date]
    ; Defines the default timezone used by the date functions
    ;date.timezone =
    ***************
    I changed this to
    ***************
    [Date]
    ; Defines the default timezone used by the date functions
    ;date.timezone = 'Australia/Melbourne' for 'EST/11.0/DST'
    ***************
    but it made no difference.

    I've Googled for this and found a huge number off hits but am getting several fixes, none of which have worked so far.

    Thank you for your time

    David
  2. 2008-12-14 06:27:42 PST
    try:

    ; Defines the default timezone used by the date functions
    date.timezone = Australia/Melbourne

    ^- no semi-colon, only one value string, restart the webserver.
  3. 2008-12-15 00:55:24 PST
    That worked perfectly, thank you very much!
  4. 2008-12-24 15:25:35 PST
    Where do you make that edit?
  5. 2008-12-24 16:58:15 PST
    >Where do you make that edit?
    in your php.ini
    (ask <?php phpifo; for the location)
  6. 2008-12-31 11:42:14 PST
    Yep. This worked for me on Leopard 10.5.6 with default apache and php.

    BTW I had to create php.ini. It is in /etc.


  7. 2008-12-31 13:42:15 PST
    Hi, i have a similar problem to david kay, the first message about this problem...
    ...................................................................................
    Runtime Notice in ./libraries/common.inc.php#272
    date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Australia/Melbourne' for 'EST/11.0/DST' instead

    Backtrace

    ./libraries/common.inc.php#272: date_default_timezone_get()
    ./setup/lib/common.inc.php#18: require_once(./libraries/common.inc.php)
    ./setup/index.php#12: require(./setup/lib/common.inc.php)
    ...................................................................................I have followed the forum and found the page and error line witch displayed below...

    date_default_timezone_set(@date_default_timezone_get());

    And i changed it to....

    ; Defines the default timezone used by the date functions
    date.timezone = europe/london
    ...................................................................................

    Now i get this error on the same line in the same common.inc.php file....

    Parse error: parse error in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpMyAdmin\libraries\common.inc.php on line 272

    Does anybody no what it means as i can find answer on google as it does not have an error.

  8. 2009-01-01 02:00:17 PST
    to get rid of that notice try and insert

    putenv('TZ=Europe/London');

    infront of that line 272 and/or change it to:

    @date_default_timezone_set(@date_default_timezone_get());

    Another option is to tell php not to display notices:
    error_reporting = E_ALL & ~E_NOTICE
    (in php.ini)
  9. 2009-01-30 02:14:30 PST
    I have the same problem as above. But I have uncommented the line. I live in Denmark so i use:
    date.timezone = europe/copenhagen

    I can see this works in phpinfo(), so now I'm wondering if this might be a phpMyAdmin problem?

    I could really use some help, so if any can solve this annoying problem or have an idea to what's wrong please share your knowledge :)
  10. 2009-02-04 14:17:03 PST
    I have been debuging this problem as well and am drawing the following conclusions.

    1) The code is not looking at the timezone set in php.ini or TZ env. variable. It is looking at the timezone set in MySQL. The time zone in MySQL is set in the format of "-5.0/no DST", so phpMyAdmin throws the error message since it is not in the format it likes... which is "America/New_York".

    2) I have edited the common.inc.php file in the phpMyAdmin libraries directory enough so that the date_default_timezone_set(@date_default_timezone_get()); command is not on line 272, but I still get the same error. I've tried clearing out the cache and iisreset to make sure that the modified file is used, and I still get the message stating that the problem is in line 272. So I think there there may be another common.inc.php file somewhere being used???

    I hope this helps us get closer to a solution.
  11. 2009-06-03 20:38:54 PDT
    looking in /xampp/ etc/php.ini | but i cannot find this line : "Defines the default timezone used by the date functions
    date.timezone =" using xampp vers 0.3(19) have the same fault when trying to configure "config" file :
    "Runtime Notice in ./libraries/common.inc.php#281
    date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Australia/ACT' for 'EST/10.0/no DST' instead
    Backtrace
    ./libraries/common.inc.php#281: date_default_timezone_get()
    ./setup/lib/common.inc.php#18: require_once(./libraries/common.inc.php)
    ./setup/index.php#12: require(./setup/lib/common.inc.php)"

    am I looking in the right file if so whaat is tline No.
    thank you
    R.C
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.