Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    187
    Plugin Contributions
    0

    Default date/time errors in certain .php files

    I am getting a lot of date/time errors in the domain log;

    [Sun Apr 07 22:32:35 2013] [error] [client 173.199.114.243] PHP Warning: date() [<a href='function.date'>function.date</a>]: 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/aap/public_html/zencart/includes/languages/english/email_extras.php on line 30

    They refer to entries like $date_range = time(); on the php pages.

    Is there a one-stop solution somewhere - a checkbox or something - that fixes things?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: date/time errors in certain .php files

    Quote Originally Posted by tpeck View Post
    Is there a one-stop solution somewhere - a checkbox or something - that fixes things?
    Yes.
    It's in the log message you quoted:
    Quote Originally Posted by tpeck View Post
    You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
    Go to your server's php.ini and set date.timezone to a valid timezone.
    If you don't have access to that file, get your hosting company to assist you or to show you how to set one up for your account specifically.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Sales or Specials with Time and Date (instead of date only) Expiration
    By townsend2009 in forum Setting Up Specials and SaleMaker
    Replies: 3
    Last Post: 29 Jan 2015, 07:56 PM
  2. Date & Time Zone issue with php.ini file
    By chad2012 in forum Installing on a Mac Server
    Replies: 2
    Last Post: 22 Jan 2012, 09:26 PM
  3. Certain PHP files don't run ( v1.3.9g)
    By Flash Tyler in forum General Questions
    Replies: 1
    Last Post: 21 Oct 2010, 11:28 PM
  4. Replies: 0
    Last Post: 12 Nov 2009, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg