{"action":"created","issue":{"url":"https://api.github.com/repos/redmatrix/hubzilla/issues/522","repository_url":"https://api.github.com/repos/redmatrix/hubzilla","labels_url":"https://api.github.com/repos/redmatrix/hubzilla/issues/522/labels{/name}","comments_url":"https://api.github.com/repos/redmatrix/hubzilla/issues/522/comments","events_url":"https://api.github.com/repos/redmatrix/hubzilla/issues/522/events","html_url":"https://github.com/redmatrix/hubzilla/issues/522","id":178481995,"number":522,"title":"Cron error on postgres","user":{"login":"ilu33","id":12608744,"avatar_url":"https://avatars.githubusercontent.com/u/12608744?v=3","gravatar_id":"","url":"https://api.github.com/users/ilu33","html_url":"https://github.com/ilu33","followers_url":"https://api.github.com/users/ilu33/followers","following_url":"https://api.github.com/users/ilu33/following{/other_user}","gists_url":"https://api.github.com/users/ilu33/gists{/gist_id}","starred_url":"https://api.github.com/users/ilu33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilu33/subscriptions","organizations_url":"https://api.github.com/users/ilu33/orgs","repos_url":"https://api.github.com/users/ilu33/repos","events_url":"https://api.github.com/users/ilu33/events{/privacy}","received_events_url":"https://api.github.com/users/ilu33/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/redmatrix/hubzilla/labels/retest%20please","name":"retest please","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-21T22:53:17Z","updated_at":"2016-09-22T14:38:43Z","closed_at":null,"body":"everytime Cron runs:\r\n```sql\r\n2016-09-10 07:53:09  \r\nselect atoken_id from atoken where atoken_expires != '0001-01-01 00:00:00' && atoken_expires < now() at time zone 'UTC'; returned false  \r\nERROR:  operator does not exist: boolean && timestamp without time zone  \r\nLINE 1: ...ken where atoken_expires != '0001-01-01 00:00:00' && atoken_...  \r\n                                                             ^  \r\nHINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.\r\n```\r\n\r\nreplace ```&&``` with ```AND``` (Source: [0])\r\n\r\n```diff\r\ndiff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php\r\nindex c66b62f..84f13c8 100644\r\n--- a/Zotlabs/Daemon/Cron.php\r\n+++ b/Zotlabs/Daemon/Cron.php\r\n@@ -64,7 +64,7 @@ class Cron {\r\n                \r\n                // delete expired access tokens\r\n \r\n-               $r = q(\"select atoken_id from atoken where atoken_expires != '%s' && atoken_expires < %s\",\r\n+               $r = q(\"select atoken_id from atoken where atoken_expires != '%s' AND atoken_expires < %s\",\r\n                        dbesc(NULL_DATE),\r\n                        db_utcnow()\r\n                );\r\n```\r\n\r\n[0] = https://stackoverflow.com/questions/4105658/the-difference-between-and-and-in-sql"},"comment":{"url":"https://api.github.com/repos/redmatrix/hubzilla/issues/comments/248922989","html_url":"https://github.com/redmatrix/hubzilla/issues/522#issuecomment-248922989","issue_url":"https://api.github.com/repos/redmatrix/hubzilla/issues/522","id":248922989,"user":{"login":"ilu33","id":12608744,"avatar_url":"https://avatars.githubusercontent.com/u/12608744?v=3","gravatar_id":"","url":"https://api.github.com/users/ilu33","html_url":"https://github.com/ilu33","followers_url":"https://api.github.com/users/ilu33/followers","following_url":"https://api.github.com/users/ilu33/following{/other_user}","gists_url":"https://api.github.com/users/ilu33/gists{/gist_id}","starred_url":"https://api.github.com/users/ilu33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilu33/subscriptions","organizations_url":"https://api.github.com/users/ilu33/orgs","repos_url":"https://api.github.com/users/ilu33/repos","events_url":"https://api.github.com/users/ilu33/events{/privacy}","received_events_url":"https://api.github.com/users/ilu33/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T14:38:43Z","updated_at":"2016-09-22T14:38:43Z","body":"Fixed."}}
{"actor":{"display_login":"ilu33"}}