Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: date(): It is not safe to rely on the system's timezone settings. #7

Open
rocpic opened this issue Jun 27, 2013 · 4 comments
Assignees

Comments

@rocpic
Copy link

rocpic commented Jun 27, 2013

Hello, about 3 days ago, the news feeds on http://RocPic.Com/news stopped showing.
I viewed the source code

which is 15 instances of the first paragraph below, followed by the 2nd paragraph, then the missing news stories are below that.

Warning: 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/New_York' for 'EDT/-4.0/DST' instead in /home/feed2js/domains/feed2js.org/public_html/feed2js.php on line 306

Warning: Cannot modify header information - headers already sent by (output started at /home/feed2js/domains/feed2js.org/public_html/feed2js.php:306) in /home/feed2js/domains/feed2js.org/public_html/feed2js.php on line 387
feed2js_ck = true;

....
document.write('

');
document.write('
@rocpic
Copy link
Author

rocpic commented Jun 28, 2013

So I went back to http://feed2js.org and pasted in the RSS feed from google, and if you include the date and time setting your preview will come up blank. I'm going to edit it out of my pages for now.

@rocpic
Copy link
Author

rocpic commented Jun 28, 2013

I moved the old index to http://rocpic.com/news/dateindex.html the http://rocpic.com/news works without dates.

@cogdog
Copy link
Owner

cogdog commented Jun 28, 2013

I can confirm this is happening when you enter an offset value for the time zone. if you leave it as the default value you get the dates. I am testing some things, first will be suppressing error warnings in the output (that should be off). There is a date_default_timezone_set() declared in the setup functions, not quite sure why this is tripping that message.

@bateller
Copy link
Collaborator

Is there a specific feed or configuration value that causes this error to occur? If I can pinpoint what throws the error I can fix it.

date_default_timezone_set should be the preferred method to set a timezone. Although we might want to sterilize that input first (to make sure invalid values aren't sent).

Another option would be to set the date via ini_set('date.timezone')

My apologies if this has already been taken care of... I just came across this issue when browsing the feed2js development tree to make sure I had www.feed2js.org up to date.

Thanks,
Brian

@bateller bateller self-assigned this Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants