]> git.wh0rd.org - tt-rss.git/commitdiff
Handle future pubDate
authorsaperduper <bobsap@gmail.com>
Mon, 25 Mar 2013 16:49:11 +0000 (18:49 +0200)
committersaperduper <bobsap@gmail.com>
Mon, 25 Mar 2013 16:49:11 +0000 (18:49 +0200)
Posts with pubDate in the future always appear at the top, which is ruining the
whole "newest at top" idea. One way to handle this is to use time() instead.
This is what google reader does and seems reasonable.

include/rssfuncs.php

index 11aa0e4ba1419bb627f8f29f60983283adf86072..130f9142c916b68d8e76425d21993aa8b84a2e7e 100644 (file)
 
                                $entry_timestamp = strtotime($item->get_date());
 
-                               if ($entry_timestamp == -1 || !$entry_timestamp) {
+                               if ($entry_timestamp == -1 || !$entry_timestamp || $entry_timestamp > time()) {
                                        $entry_timestamp = time();
                                        $no_orig_date = 'true';
                                } else {