It is not safe to rely on the system's timezone settings. date.timezone setting or the date_default


  • Default avatar
    richard5    
     4 years ago
    0

    I am getting this error message all over the AWO Coupon component.

    The error began with upgrading the server to php 5.3.3.

    I have already done the fixes for this error in php.ini and the date.php file in joomla, but it isn't going away with this component.

    The errors are actually stating:

    Warning: date() [function.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 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /var/www/vhosts/mydomain/httpdocs/administrator/components/com_awocoupon/admin.awocoupon.php on line 35

  • Your avatar
    seyi    
     4 years ago
    0

    Not doing anything out of the ordinary. So you set your timezone within your php.ini file?
  • Default avatar
    richard5    
     4 years ago
    0

    The timezone is properly set in php.ini and the error doesn't show up in other locations. Only in the AWO area and when people try to submit a coupon.

    So - I would conclude that this is out of the ordinary.
  • Your avatar
    seyi    
     4 years ago
    0

    Hello,

    It is happening in your front end too? This file is not called in the front end so that would be very strange. Please feel free to look at the file content, the only time function being used is date in this way
    <?php
    date
    ('Y');
    ?>


    Looking at the documentation:
    http://php.net/manual/en/function.date.php

    This is not used out of the ordinary.

    ... Unless it is something else that I am not seeing
  • Default avatar
    richard5    
     4 years ago
    0

    No - no error displays in the front end - but when you submit an order, the coupon discount is stripped away and the person is charged the full amount.

    The use of the coupon does not even save.

    This started when the time issue began to show itself on the admin side...so the assumption has been it is related.

    Rick

  • Your avatar
    seyi    
     4 years ago
    0

    took a look at the issue with coupons not saving. Seems to be a onepage checkout problem where the session variable is not being recognized.
  • Default avatar
    andrew80    
     3 years ago
    0

    We are also getting this error since upgrading our server to PHP 5.3.

    The error is only with awocoupon, all other extensions are working just fine.

    Edit:
    just in case anyone else comes across this, the issue was with setting date.timezone in the php.ini file. Make sure it's within your admin folder.