The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Nov 14, 2009 9:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 14, 2007 4:08 pm
Posts: 40
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:
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?


Top
 Profile  
 
PostPosted: Sat Nov 14, 2009 10:16 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18757
Location: Omaha, NE
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:
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
http://www.kiwaniswest.org


Top
 Profile  
 
PostPosted: Sun Nov 15, 2009 1:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 14, 2007 4:08 pm
Posts: 40
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?


Top
 Profile  
 
PostPosted: Sun Nov 15, 2009 3:05 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Oct 02, 2005 12:50 am
Posts: 18757
Location: Omaha, NE
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
http://www.kiwaniswest.org


Top
 Profile  
 
PostPosted: Sun Jan 24, 2010 11:59 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jun 05, 2009 11:04 pm
Posts: 25
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


Top
 Profile  
 
PostPosted: Tue Jun 14, 2011 9:12 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Jun 14, 2011 8:54 am
Posts: 1
Hi All,
I overcome such issue as follows;
1.Open date.php
2.Find the line
Code:
function __construct($date = 'now', $tzOffset = 0)
which is the function definition
3.At the very beginning of the function definition, insert the code
Code:
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 - viewtopic.php?f=8&t=65


Top
 Profile  
 
PostPosted: Thu Jun 23, 2011 11:30 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 01, 2008 6:32 am
Posts: 15
ayzit wrote:
Hi All,
I overcome such issue as follows;
1.Open date.php
2.Find the line
Code:
function __construct($date = 'now', $tzOffset = 0)
which is the function definition
3.At the very beginning of the function definition, insert the code
Code:
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:
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/cfis7206/public_html/libraries/joomla/utilities/date.php on line 52


Top
 Profile  
 
PostPosted: Sat Jun 25, 2011 3:21 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Mon Aug 29, 2005 10:17 am
Posts: 13949
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
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 Professional Support Services : http://gws-desk.com --
-- Good & Cheap Joomla Sites Ready To Roll : http://gws-deals.today --
-- Joomla Specialized Hosting Solutions : www.gws-host.com --
-- Member Joomla Bug Squad --


Top
 Profile  
 
PostPosted: Tue Aug 14, 2012 5:19 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Thu Feb 17, 2011 6:13 am
Posts: 332
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


Top
 Profile  
 
PostPosted: Thu Sep 06, 2012 5:10 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Sep 06, 2012 4:53 am
Posts: 1
Thank you dhuelsmann!!! The simple edit to the php.ini worked for me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 



Who is online

Users browsing this forum: No registered users and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group