#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,660
    Rep Power
    171

    Message: strtotime(): It is not safe


    I get error when I do this:
    PHP Code:
    echo date('d/m/Y',strtotime($row['expiry'])); 
    A PHP Error was encountered

    Severity: Warning

    Message: 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 'Australia/ACT' for 'EST/10.0/no DST' instead


    Line Number: 53
    Then I thought I do this:
    PHP Code:
    date_default_timezone_set('Australia/Brisbane'); 
    And now I get this:
    A PHP Error was encountered

    Severity: Notice

    Message: date_default_timezone_set(): Timezone ID 'Australia/Brisbane' is invalid
    What is going on?
    Last edited by English Breakfast Tea; September 18th, 2013 at 08:05 PM.
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,054
    Rep Power
    9398
    Your timezone database might be out of date?

    Linux? What's the output of the shell command
    Code:
    $ find /usr/share -type d -name Australia | xargs ls -lR
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,660
    Rep Power
    171
    Originally Posted by requinix
    Your timezone database might be out of date?

    Linux? What's the output of the shell command
    Code:
    $ find /usr/share -type d -name Australia | xargs ls -lR
    Hi;

    Code:
    -rw-r--r--. 4 root root 2683 Oct  4  2012 ACT
    -rw-r--r--. 2 root root 2702 Oct  4  2012 Adelaide
    -rw-r--r--. 2 root root  913 Oct  4  2012 Brisbane
    -rw-r--r--. 2 root root 2737 Oct  4  2012 Broken_Hill
    -rw-r--r--. 4 root root 2683 Oct  4  2012 Canberra
    -rw-r--r--. 1 root root 2683 Oct  4  2012 Currie
    -rw-r--r--. 2 root root  788 Oct  4  2012 Darwin
    -rw-r--r--. 1 root root  946 Oct  4  2012 Eucla
    -rw-r--r--. 2 root root 2795 Oct  4  2012 Hobart
    -rw-r--r--. 2 root root 2321 Oct  4  2012 LHI
    -rw-r--r--. 1 root root  983 Oct  4  2012 Lindeman
    -rw-r--r--. 2 root root 2321 Oct  4  2012 Lord_Howe
    -rw-r--r--. 2 root root 2683 Oct  4  2012 Melbourne
    -rw-r--r--. 2 root root  788 Oct  4  2012 North
    -rw-r--r--. 4 root root 2683 Oct  4  2012 NSW
    -rw-r--r--. 2 root root  940 Oct  4  2012 Perth
    -rw-r--r--. 2 root root  913 Oct  4  2012 Queensland
    -rw-r--r--. 2 root root 2702 Oct  4  2012 South
    -rw-r--r--. 4 root root 2683 Oct  4  2012 Sydney
    -rw-r--r--. 2 root root 2795 Oct  4  2012 Tasmania
    -rw-r--r--. 2 root root 2683 Oct  4  2012 Victoria
    -rw-r--r--. 2 root root  940 Oct  4  2012 West
    -rw-r--r--. 2 root root 2737 Oct  4  2012 Yancowinna

IMN logo majestic logo threadwatch logo seochat tools logo