Article Time ahead 1 Hour

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
pinion
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 06 Apr 2013, 00:24

Article Time ahead 1 Hour

Postby pinion » 06 Apr 2013, 00:33

My articles have a time on them that is an hour ahead of my actual time. I've selected the right time zone in the interface and verified that my server time is correct, both locally and the UTC time matches. I'm not sure what I could be doing wrong, perhaps it's just the way some of the people are posting their feeds. Has anyone else seen this? Hopefully it's just something I've missed somewhere.

pinion
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 06 Apr 2013, 00:24

Re: Article Time ahead 1 Hour

Postby pinion » 06 Apr 2013, 00:52

As an example this post shows a time of 3:30 on their website but 4:30 in my feed but it physically showed up sometime before 4 in my feed: http://www.tuaw.com/2013/04/05/daily-ip ... -microrpg/

So while it could be a problem with the timestamp on the feed Simplepie is parsing I think it's more likely something I've set wrong somewhere (or didn't set). But other than the timezone in preferences and the time on the server I don't know what else to check.

phz
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 18 Mar 2013, 18:32

Re: Article Time ahead 1 Hour

Postby phz » 06 Apr 2013, 01:19

Have you set the correct timezone in the `php.ini` file for your PHP installation? In the category `[Date]`, variable `date.timezone`. See http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone.

That is is one hour that differs and that you noticed it just now might very well be related to a DST error, since at least the EU entered DST last Sunday.

smeerbartje
Bear Rating Disaster
Bear Rating Disaster
Posts: 67
Joined: 04 Apr 2013, 23:24
Contact:

Re: Article Time ahead 1 Hour

Postby smeerbartje » 06 Apr 2013, 12:16

Same here; I have set the timezone in the php.ini file. I also have set the timezone in the tt-rss preferences. Now when I look at the update2.php logging, I see that the timestamps are two hours late. In the example below, actual time was 10:14. What could be wrong?

Code: Select all

[08:14:51/13011] Removed 0 files.
[08:14:51/13011] Expiring cache/export
[08:14:51/13011] Removed 0 files.
[08:14:51/13011] Removing old lock files...
[08:14:51/13011] Removed 0 files.
[08:14:51/13011] Base feed: http://feeds.feedburner.com/tweakers/nieuws
[08:14:51/13011]  => 2013-04-06 07:44:45, 27

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article Time ahead 1 Hour

Postby fox » 06 Apr 2013, 12:21

Daemon logs in UTC.

smeerbartje
Bear Rating Disaster
Bear Rating Disaster
Posts: 67
Joined: 04 Apr 2013, 23:24
Contact:

Re: Article Time ahead 1 Hour

Postby smeerbartje » 06 Apr 2013, 12:23

Thanks; this could be an improvement for future versions.

pinion
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 06 Apr 2013, 00:24

Re: Article Time ahead 1 Hour

Postby pinion » 08 Apr 2013, 02:31

My php.ini in /etc has the right timezone and my system has the right timezone. The daemon is logging the proper UTC time and my user account has the correct timezone set as well. But I'm still an hour ahead on the article times and I have no idea why. Maybe I'll switch everything to New York since I'm on Eastern time anyway and see if that makes a difference. It's been doing this for about a month ever since I first installed ttrss. Anyone have any other ideas what to check on?

AngryChris
Bear Rating Master
Bear Rating Master
Posts: 135
Joined: 08 Apr 2013, 02:42

Re: Article Time ahead 1 Hour

Postby AngryChris » 08 Apr 2013, 02:45

It sounds like your timezone is "wrong" insomuch as it sounds like articles are being displayed in Eastern Standard Time when you're now in Eastern Daylight time (with EST being one hour ahead of EDT). The switch this year was on March 10th which is "about a month ago" (today being April 7th). How you correct it, I don't know, but this strikes me as being the root of your issue.

phz
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 18 Mar 2013, 18:32

Re: Article Time ahead 1 Hour

Postby phz » 08 Apr 2013, 09:45

AngryChris wrote:It sounds like your timezone is "wrong" insomuch as it sounds like articles are being displayed in Eastern Standard Time when you're now in Eastern Daylight time (with EST being one hour ahead of EDT). The switch this year was on March 10th which is "about a month ago" (today being April 7th). How you correct it, I don't know, but this strikes me as being the root of your issue.

Exactamundo. "Correct" timezone concerns DST issues as much as UTC offset (unless one wants to manually change things twice a year). E.g. UTC+1 and CET might seem equivalent (and I've seen several programming errors in this respect in different places), but aren't, since the latter takes DST into account and thus is correct all year round.

Check `php.ini` and make sure the timezone is really correctly specified, would be my first guess.

dang
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 19 Mar 2013, 22:06

Re: Article Time ahead 1 Hour

Postby dang » 08 Apr 2013, 16:19

And make sure you're not using one of the Eastern zone files (such as parts of Indiana) that don't use DST.

pinion
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 06 Apr 2013, 00:24

Re: Article Time ahead 1 Hour

Postby pinion » 08 Apr 2013, 19:14

I changed the timezone on the admin account to America/New_York this morning. I also did this in my user account which I changed a few days ago and it didn't make a difference. However, changing the admin account time zone seems to make all the articles show up at the appropriate times in my user account. It doesn't seem like the admin time zone would have any bearing at all on the user timezones. So I have no idea why it started working properly after I changed it.

NemesisRE
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 26 Apr 2013, 01:24

Re: Article Time ahead 1 Hour

Postby NemesisRE » 26 Apr 2013, 01:33

Hi,
I'm new to TTRSS but I love it! Thanks for your hard work!

I have the wrong time too but only on the folder view in the feed view is the right time.

Some Information:
TTRSS Version: trunk
Server: Ubuntu 12.10 - Apache2 - PHP5.4.6
Server Timezone: Europe/Berlin


Hope this helps :)

Kind regards
Steven

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article Time ahead 1 Hour

Postby fox » 26 Apr 2013, 08:27

Now that I think about it there's nothing in tt-rss for DST support. Maybe a separate checkbox for DST is required or detecting based on http client-date or something.

Edit: http://www.thisprogrammingthing.com/201 ... e-website/ looks like php 5.3 has support for timezone transitions, but I don't think those are used automatically.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article Time ahead 1 Hour

Postby fox » 26 Apr 2013, 08:45

NemesisRE wrote:I have the wrong time too but only on the folder view in the feed view is the right time.


Yeah, I'm also seeing this. For some reason in some situation when a cached timezone object is first created it gives the non-DST offset, but in other cases it works properly. No idea why.

Edit: this is quite strange. Looks like timezone getOffset() is confused (?) by some oldish dates (like 1970-01-01) and doesn't return offset with DST (or maybe there was no DST in 1970s? I dunno.) and with the way it was done previously the offset got stored and screwed all subsequent date calculations. I have changed it to save the timezone object so that offset is calculated correctly for each specified timestamp, which seems to fix stuff. At least setting timezone to Europe/Berlin seems to give correct time everywhere.

https://github.com/gothfox/Tiny-Tiny-RS ... 7067eb1747

Report results.

Edit2: Also there's an automatic timezone now which uses your browser reported tz offset.

NemesisRE
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 26 Apr 2013, 01:24

Re: Article Time ahead 1 Hour

Postby NemesisRE » 26 Apr 2013, 13:19

fox wrote:
NemesisRE wrote:I have the wrong time too but only on the folder view in the feed view is the right time.


Yeah, I'm also seeing this. For some reason in some situation when a cached timezone object is first created it gives the non-DST offset, but in other cases it works properly. No idea why.

Edit: this is quite strange. Looks like timezone getOffset() is confused (?) by some oldish dates (like 1970-01-01) and doesn't return offset with DST (or maybe there was no DST in 1970s? I dunno.) and with the way it was done previously the offset got stored and screwed all subsequent date calculations. I have changed it to save the timezone object so that offset is calculated correctly for each specified timestamp, which seems to fix stuff. At least setting timezone to Europe/Berlin seems to give correct time everywhere.

https://github.com/gothfox/Tiny-Tiny-RS ... 7067eb1747

Report results.

Edit2: Also there's an automatic timezone now which uses your browser reported tz offset.


Great seams to work! You are fast!

Thanks
Steven


Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests