]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: force returned timestamps to integer
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 15 Mar 2013 05:40:31 +0000 (09:40 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 15 Mar 2013 05:40:31 +0000 (09:40 +0400)
classes/api.php

index 4b24b01107c5f7f9447961b1ff4f4edd84d9e926..a23f20ae208e20f1c23e1fd535d386cd4852fd4e 100644 (file)
@@ -309,7 +309,7 @@ class API extends Handler {
                                        "published" => sql_bool_to_bool($line["published"]),
                                        "comments" => $line["comments"],
                                        "author" => $line["author"],
-                                       "updated" => strtotime($line["updated"]),
+                                       "updated" => (int) strtotime($line["updated"]),
                                        "content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"],
                                        "feed_id" => $line["feed_id"],
                                        "attachments" => $attachments
@@ -563,7 +563,7 @@ class API extends Handler {
                                                        "unread" => (int)$unread,
                                                        "has_icon" => $has_icon,
                                                        "cat_id" => (int)$line["cat_id"],
-                                                       "last_updated" => strtotime($line["last_updated"]),
+                                                       "last_updated" => (int) strtotime($line["last_updated"]),
                                                        "order_id" => (int) $line["order_id"],
                                                );
 
@@ -604,7 +604,7 @@ class API extends Handler {
                                                "unread" => sql_bool_to_bool($line["unread"]),
                                                "marked" => sql_bool_to_bool($line["marked"]),
                                                "published" => sql_bool_to_bool($line["published"]),
-                                               "updated" => strtotime($line["updated"]),
+                                               "updated" => (int) strtotime($line["updated"]),
                                                "is_updated" => $is_updated,
                                                "title" => $line["title"],
                                                "link" => $line["link"],