strftime() error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
strftime() [function.strftime]: 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 'Europe/London' for '0.0/no DST' instead

This appeared while using Smarty. I had used Smarty before on this
computer and this had never appeared. What happened?


// put header at the top of the compiled template
$template_header = "<?php /* Smarty version ".$this->_version.",
created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
$template_header .= "         compiled from
".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))."
*/ ?>\n";

The second line, where strftime() is, is what causes the error.

Re: strftime() error

On Jan 28, 5:04 am, Bruno Rafael Moreira de Barros
Quoted text here. Click to load it

Since PHP 5.1.0, if you're running with E_STRICT error reporting
you'll get that if the timezone hasn't been explicitly set.  You can
explicitly set it in any of the following ways:

The date.timezone setting in php.ini
At runtime with date_default_timezone_set()
Setting the TZ variable in Apache's environment (in
httpd.conf, .htaccess, or a few other ways)

Re: strftime() error

Oh ok thanks, I didn't know that.

Re: strftime() error

On Jan 29, 8:40 am, Bruno Rafael Moreira de Barros
Quoted text here. Click to load it

Yeah, I saw that on the manual page for strftime():


Site Timeline