{"action":"created","issue":{"url":"https://api.github.com/repos/scrapy/scrapy/issues/1278","labels_url":"https://api.github.com/repos/scrapy/scrapy/issues/1278/labels{/name}","comments_url":"https://api.github.com/repos/scrapy/scrapy/issues/1278/comments","events_url":"https://api.github.com/repos/scrapy/scrapy/issues/1278/events","html_url":"https://github.com/scrapy/scrapy/pull/1278","id":84749853,"number":1278,"title":"Remove deprecated %z formatting from the default LOG_DATEFORMAT","user":{"login":"Curita","id":213781,"avatar_url":"https://avatars.githubusercontent.com/u/213781?v=3","gravatar_id":"","url":"https://api.github.com/users/Curita","html_url":"https://github.com/Curita","followers_url":"https://api.github.com/users/Curita/followers","following_url":"https://api.github.com/users/Curita/following{/other_user}","gists_url":"https://api.github.com/users/Curita/gists{/gist_id}","starred_url":"https://api.github.com/users/Curita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Curita/subscriptions","organizations_url":"https://api.github.com/users/Curita/orgs","repos_url":"https://api.github.com/users/Curita/repos","events_url":"https://api.github.com/users/Curita/events{/privacy}","received_events_url":"https://api.github.com/users/Curita/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-03T20:09:27Z","updated_at":"2015-06-05T19:47:40Z","closed_at":"2015-06-04T16:39:01Z","pull_request":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/1278","html_url":"https://github.com/scrapy/scrapy/pull/1278","diff_url":"https://github.com/scrapy/scrapy/pull/1278.diff","patch_url":"https://github.com/scrapy/scrapy/pull/1278.patch"},"body":"Closes #1270\r\n\r\nNot sure if the timezone is going to be missed from the logs (twisted logging had it) and I'm not entirely sure why windows is expanding it to contain non-ascii chars as reported in the issue, but '%z' time formatting is deprecated as stated here: ~~https://docs.python.org/2/library/time.html#id2~~ [EDIT: I misread it, but is not listed in https://docs.python.org/2/library/time.html#time.strftime so it seems it's not officially supported], so it's probably safer to just remove it. '%Y-%m-%d %H:%M:%S' is the default datefmt for 'asctime' if there isn't one specified as well.\r\n\r\nNote that this change just aims to have a sane default, since this is really a python logging issue. Users could still set LOG_DATEFORMAT to whatever they want, but they'll have to deal with the issues the python logging could arise."},"comment":{"url":"https://api.github.com/repos/scrapy/scrapy/issues/comments/109419416","html_url":"https://github.com/scrapy/scrapy/pull/1278#issuecomment-109419416","issue_url":"https://api.github.com/repos/scrapy/scrapy/issues/1278","id":109419416,"user":{"login":"nramirezuy","id":1042865,"avatar_url":"https://avatars.githubusercontent.com/u/1042865?v=3","gravatar_id":"","url":"https://api.github.com/users/nramirezuy","html_url":"https://github.com/nramirezuy","followers_url":"https://api.github.com/users/nramirezuy/followers","following_url":"https://api.github.com/users/nramirezuy/following{/other_user}","gists_url":"https://api.github.com/users/nramirezuy/gists{/gist_id}","starred_url":"https://api.github.com/users/nramirezuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nramirezuy/subscriptions","organizations_url":"https://api.github.com/users/nramirezuy/orgs","repos_url":"https://api.github.com/users/nramirezuy/repos","events_url":"https://api.github.com/users/nramirezuy/events{/privacy}","received_events_url":"https://api.github.com/users/nramirezuy/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T19:47:40Z","updated_at":"2015-06-05T19:47:40Z","body":"If I understand correctly we can use [`formatter.converter = time.gmtime`](https://docs.python.org/2/library/logging.html#logging.Formatter.formatTime)"}}