{"action":"created","issue":{"url":"https://api.github.com/repos/getpelican/pelican/issues/2488","repository_url":"https://api.github.com/repos/getpelican/pelican","labels_url":"https://api.github.com/repos/getpelican/pelican/issues/2488/labels{/name}","comments_url":"https://api.github.com/repos/getpelican/pelican/issues/2488/comments","events_url":"https://api.github.com/repos/getpelican/pelican/issues/2488/events","html_url":"https://github.com/getpelican/pelican/issues/2488","id":388502715,"node_id":"MDU6SXNzdWUzODg1MDI3MTU=","number":2488,"title":"Article from WP import has no date -> TypeError: can't compare offset-naive and offset-aware datetimes","user":{"login":"unformatt","id":157132,"node_id":"MDQ6VXNlcjE1NzEzMg==","avatar_url":"https://avatars1.githubusercontent.com/u/157132?v=4","gravatar_id":"","url":"https://api.github.com/users/unformatt","html_url":"https://github.com/unformatt","followers_url":"https://api.github.com/users/unformatt/followers","following_url":"https://api.github.com/users/unformatt/following{/other_user}","gists_url":"https://api.github.com/users/unformatt/gists{/gist_id}","starred_url":"https://api.github.com/users/unformatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unformatt/subscriptions","organizations_url":"https://api.github.com/users/unformatt/orgs","repos_url":"https://api.github.com/users/unformatt/repos","events_url":"https://api.github.com/users/unformatt/events{/privacy}","received_events_url":"https://api.github.com/users/unformatt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-07T04:35:38Z","updated_at":"2018-12-12T21:50:02Z","closed_at":null,"author_association":"NONE","body":"pelican==4.0.1\r\nPython 2.7.10 (default, Feb  7 2017, 00:08:15)\r\n[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin\r\n\r\n\r\n- Did Quick Start from docs, created 1 example article. No errors\r\n- Imported WordPress XML, ran `pelican content`. It imported a draft from WP and for some reason it had no date in the resulting .rst file. This resulted in `TypeError: can't compare offset-naive and offset-aware datetimes` error when trying to sort the articles in  [`pelican/utils.py` line 763](https://github.com/getpelican/pelican/blob/master/pelican/utils.py#L763). \r\n\r\nI printed the dates it's trying to sort. 9999 is the date from the draft article with no date. It's worth noting other draft articles from the WP import have dates.\r\n\r\n```\r\nSafeDatetime(2010, 11, 2, 19, 38, tzinfo=<DstTzInfo 'America/New_York' EDT-1 day, 20:00:00 DST>)\r\nSafeDatetime(2011, 4, 20, 1, 11, tzinfo=<DstTzInfo 'America/New_York' EDT-1 day, 20:00:00 DST>)\r\ndatetime.datetime(9999, 12, 31, 23, 59, 59, 999999)\r\nSafeDatetime(2010, 5, 7, 12, 47, tzinfo=<DstTzInfo 'America/New_York' EDT-1 day, 20:00:00 DST>)\r\n```"},"comment":{"url":"https://api.github.com/repos/getpelican/pelican/issues/comments/446757168","html_url":"https://github.com/getpelican/pelican/issues/2488#issuecomment-446757168","issue_url":"https://api.github.com/repos/getpelican/pelican/issues/2488","id":446757168,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Njc1NzE2OA==","user":{"login":"avaris","id":1186345,"node_id":"MDQ6VXNlcjExODYzNDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1186345?v=4","gravatar_id":"","url":"https://api.github.com/users/avaris","html_url":"https://github.com/avaris","followers_url":"https://api.github.com/users/avaris/followers","following_url":"https://api.github.com/users/avaris/following{/other_user}","gists_url":"https://api.github.com/users/avaris/gists{/gist_id}","starred_url":"https://api.github.com/users/avaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avaris/subscriptions","organizations_url":"https://api.github.com/users/avaris/orgs","repos_url":"https://api.github.com/users/avaris/repos","events_url":"https://api.github.com/users/avaris/events{/privacy}","received_events_url":"https://api.github.com/users/avaris/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T21:50:02Z","updated_at":"2018-12-12T21:50:02Z","author_association":"MEMBER","body":"Hmm... [This](https://github.com/getpelican/pelican/blob/master/pelican/contents.py#L520-L521) doesn't set timezone like [usual](https://github.com/getpelican/pelican/blob/master/pelican/contents.py#L129-L139)"}}
{"actor":{"display_login":"avaris"}}