System Timezone Error Messages in Joomla 1.5.15

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
lolajl
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Mon May 14, 2007 4:08 pm

System Timezone Error Messages in Joomla 1.5.15

Post by lolajl » Sat Nov 14, 2009 9:32 pm

I'm running Snow Leopard, OS X, which uses PHP 5.3.0. I installed the latest package, Joomla 1.5.15. When I go to Article Manager, I get error messages like this one:

Code: Select all

Warning: strtotime() [function.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 'America/New_York' for 'EST/-5.0/no DST' instead in /Library/WebServer/Documents/joomlafive/libraries/joomla/utilities/date.php on line 56
Same likewise for User Manager, and a few other places. Wasn't this bug supposed to have been fixed as of 1.5.13??? What else should I do to fix this issue?

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: System Timezone Error Messages in Joomla 1.5.15

Post by dhuelsmann » Sat Nov 14, 2009 10:16 pm

This is not a Joomla issue. This is a PHP change, not a Joomla change. PHP 5.3.0 needs the date.timezone ini entry setting properly in order to avoid the warning being sent out. Prior to PHP 5.3.0, the line existed in the PHP ini but was generally commented out. Let php know what your time zone is. You can edit your php.ini file and put in the following line:

Code: Select all

date.timezone = "America/Anchorage"
You can find valid time zone strings at http://nl3.php.net/manual/en/timezones.php You should, of course, use the time zone you want, not necessarily "America/Anchorage". Depending on your setup you may need to restart your web services after making the change.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

lolajl
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Mon May 14, 2007 4:08 pm

Re: System Timezone Error Messages in Joomla 1.5.15

Post by lolajl » Sun Nov 15, 2009 1:11 pm

Okay . . . I went into /private/etc/apache2/php.ini and modified this line to read:

date.timezone = "America/New_York"

Then, I shut down, and restarted Apache server. I'm still getting the timezone error messages. When I check phpInfo(), I'm getting no values for date.timezone. What else should I do?

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: System Timezone Error Messages in Joomla 1.5.15

Post by dhuelsmann » Sun Nov 15, 2009 3:05 pm

lolajl wrote:Okay . . . I went into /private/etc/apache2/php.ini and modified this line to read:

date.timezone = "America/New_York"

Then, I shut down, and restarted Apache server. I'm still getting the timezone error messages. When I check phpInfo(), I'm getting no values for date.timezone. What else should I do?
Unfortunately, apache frequently has several php.ini floating around. Check the php information on the backend of your Joomla installation to see which one Joomla is accessing under the "Loaded Configuration File" item. Make sure that file is appropriately modified.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

jbruku
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri Jun 05, 2009 11:04 pm

Re: System Timezone Error Messages in Joomla 1.5.15

Post by jbruku » Sun Jan 24, 2010 11:59 pm

I am unfortunately dealing with the same issue and have not been able to resolve it. i changed the php.ini file accordingly to 'America/New_York', and that is definitely the loaded config. file on my backend...I am using XAMPP version 1.7.3 on Windows Vista. Here is the message i continue to receive, any help is greatly appreciated.

Warning: mktime() [function.mktime]: 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/New_York' for '-5.0/no DST' instead in C:\xampp\htdocs\Joomla150\libraries\joomla\utilities\date.php on line 117

AND

Warning: strftime() [function.strftime]: 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/New_York' for '-5.0/no DST' instead in C:\xampp\htdocs\Joomla150\libraries\joomla\utilities\date.php on line 250

ayzit
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jun 14, 2011 8:54 am

Re: System Timezone Error Messages in Joomla 1.5.15

Post by ayzit » Tue Jun 14, 2011 9:12 am

Hi All,
I overcome such issue as follows;
1.Open date.php
2.Find the line

Code: Select all

function __construct($date = 'now', $tzOffset = 0)
which is the function definition
3.At the very beginning of the function definition, insert the code

Code: Select all

date_default_timezone_set ("yourTimeZone");
4.You can find the list of time zones by searching google. In my case the time zone was "Europe/Istanbul"

Regards
Ayzit Elif EKEN
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

drummerbran
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Sun Jun 01, 2008 6:32 am

Re: System Timezone Error Messages in Joomla 1.5.15

Post by drummerbran » Thu Jun 23, 2011 11:30 pm

ayzit wrote:Hi All,
I overcome such issue as follows;
1.Open date.php
2.Find the line

Code: Select all

function __construct($date = 'now', $tzOffset = 0)
which is the function definition
3.At the very beginning of the function definition, insert the code

Code: Select all

date_default_timezone_set ("yourTimeZone");
4.You can find the list of time zones by searching google. In my case the time zone was "Europe/Istanbul"

Regards
Ayzit Elif EKEN
Can You please show me what your code looks like/ I am now getting an erro saying

Code: Select all

Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/cfis7206/public_html/libraries/joomla/utilities/date.php on line 52

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: System Timezone Error Messages in Joomla 1.5.15

Post by leolam » Sat Jun 25, 2011 3:21 am

ayzit wrote:Hi All,
I overcome such issue as follows;
1.Open date.php
It is bad practice to change default code to solve issues which can be resolved in a simple way. By changing code you will need to document very well what has been changed since any upgrade will remove the code changes and it has to redone again. Also for non coders changing code results in errors as you can see above by none experienced users

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

lip420
Joomla! Guru
Joomla! Guru
Posts: 510
Joined: Thu Feb 17, 2011 6:13 am

Re: System Timezone Error Messages in Joomla 1.5.15

Post by lip420 » Tue Aug 14, 2012 5:19 pm

So what's the simple way?

I have pending articles and I tried adding the time zone to the php.ini but that didn't solve it for me. I have 404's everywhere and my articles are all pending. I am not upgrading my server upgraded to a new php 5.3.10 and I am on 1.5.25

swimgirl86
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Sep 06, 2012 4:53 am

Re: System Timezone Error Messages in Joomla 1.5.15

Post by swimgirl86 » Thu Sep 06, 2012 5:10 am

Thank you dhuelsmann!!! The simple edit to the php.ini worked for me.


Locked

Return to “General Questions/New to Joomla! 2.5”