Greyhole - PHP Warning

JohnWhitmore
Posts: 1
Joined: Sun Feb 13, 2011 5:20 pm

Greyhole - PHP Warning

Postby JohnWhitmore » Sun Feb 13, 2011 5:27 pm

Hi all,

got a new Amahi/Fedora14 setup going.
I am finding the following error occurs

PHP Warning: date_default_timezone_get(): 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 'Pacific/Auckland' for 'NZDT/13.0/DST' instead in /usr/bin/greyhole on line 39

This happens from time to time in terminal. It occurs everytime I type
while [ 1 == 1 ]; do greyhole --view-queue | grep Total; sleep 60; done
to see the Greyhole operations queue.

Is this an easy fix? What should I change the line to ready?

I note the line currently reads
date_default_timezone_set(date_default_timezone_get());

Is this a bug...or a newbie issue. I am new to linux and still getting my head around the commands etc

Thanks
John

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Greyhole - PHP Warning

Postby bigfoot65 » Mon Feb 14, 2011 5:50 am

Hello,

This is a problem with Fedora 14. What you can do to make the warning go away is change:

date_default_timezone_set(date_default_timezone_get());

to read as this:

date_default_timezone_set('Pacific/Auckland');

That's what I did on my system and the message disappeared. This is something we are looking into, but unsure when it will be resolved.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

LittleMike
Posts: 8
Joined: Sun Feb 13, 2011 2:54 pm

Re: Greyhole - PHP Warning

Postby LittleMike » Mon Feb 14, 2011 1:08 pm

Hello,

This is a problem with Fedora 14. What you can do to make the warning go away is change:

date_default_timezone_set(date_default_timezone_get());

to read as this:

date_default_timezone_set('Pacific/Auckland');

That's what I did on my system and the message disappeared. This is something we are looking into, but unsure when it will be resolved.
I also get this error message using Fedora 12. I will try the above fix and see if it resolves the issue.

Thanks,
Mike

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole - PHP Warning

Postby gboudreau » Mon Feb 14, 2011 6:17 pm

The correct way to fix this is to add a line in your /etc/php.ini file:

date.timezone = "America/Montreal"

The list of available timezone values you can use can be found here: http://www.php.net/manual/en/timezones.php
- Guillaume Boudreau

LittleMike
Posts: 8
Joined: Sun Feb 13, 2011 2:54 pm

Re: Greyhole - PHP Warning

Postby LittleMike » Mon Feb 14, 2011 8:45 pm

The correct way to fix this is to add a line in your /etc/php.ini file:

date.timezone = "US/Central"

The list of available timezone values you can use can be found here: http://www.php.net/manual/en/timezones.php
Comments in the link you posted say that the US/Central format is no longer officially supported and that you should use the America/City format instead. Which one should we use to ensure compatibility?

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole - PHP Warning

Postby gboudreau » Tue Feb 15, 2011 3:40 am

Continent/City format is what should be used; fixed my post above to reflect this.
- Guillaume Boudreau

LittleMike
Posts: 8
Joined: Sun Feb 13, 2011 2:54 pm

Re: Greyhole - PHP Warning

Postby LittleMike » Tue Feb 15, 2011 10:05 am

Continent/City format is what should be used; fixed my post above to reflect this.
Gotcha. Thanks for the update :)

cosmin
Posts: 1
Joined: Tue Feb 22, 2011 8:07 am

Re: Greyhole - PHP Warning

Postby cosmin » Tue Feb 22, 2011 8:08 am

should it be any zone or the correct timezone? i live in europe so american timezone is not technically correct

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole - PHP Warning

Postby gboudreau » Tue Feb 22, 2011 8:11 am

It should be your own timezone.
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 33 guests