{"action":"closed","issue":{"url":"https://api.github.com/repos/python-babel/babel/issues/129","repository_url":"https://api.github.com/repos/python-babel/babel","labels_url":"https://api.github.com/repos/python-babel/babel/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/python-babel/babel/issues/129/comments","events_url":"https://api.github.com/repos/python-babel/babel/issues/129/events","html_url":"https://github.com/python-babel/babel/issues/129","id":51668945,"number":129,"title":"When using format_datetime function I am unable to get same results as strftime","user":{"login":"Kris2k","id":775574,"avatar_url":"https://avatars.githubusercontent.com/u/775574?v=3","gravatar_id":"","url":"https://api.github.com/users/Kris2k","html_url":"https://github.com/Kris2k","followers_url":"https://api.github.com/users/Kris2k/followers","following_url":"https://api.github.com/users/Kris2k/following{/other_user}","gists_url":"https://api.github.com/users/Kris2k/gists{/gist_id}","starred_url":"https://api.github.com/users/Kris2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kris2k/subscriptions","organizations_url":"https://api.github.com/users/Kris2k/orgs","repos_url":"https://api.github.com/users/Kris2k/repos","events_url":"https://api.github.com/users/Kris2k/events{/privacy}","received_events_url":"https://api.github.com/users/Kris2k/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/python-babel/babel/labels/(1)%20investigated","name":"(1) investigated","color":"bfdadc"},{"url":"https://api.github.com/repos/python-babel/babel/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2014-12-11T10:16:57Z","updated_at":"2016-07-15T11:50:01Z","closed_at":"2016-07-15T11:50:01Z","body":"I was unable to get UTC 'timezone' printed using Z or z when using format_datetime function. Here is sample code that shows what I mean.\r\n\r\n```python\r\n#!/bin/env python2.7\r\nimport datetime\r\nimport pytz\r\nfrom jinja2 import contextfilter\r\nfrom babel.dates import format_datetime\r\nfrom babel import Locale\r\n\r\ndef babel_format_datetime(input_time, fmt):\r\n    time_zone = pytz.utc\r\n    locale = Locale.parse('en_GB')\r\n    return format_datetime(datetime=input_time, format=fmt,\r\n            tzinfo=time_zone, locale=locale)\r\n\r\nif __name__ == \"__main__\":\r\n    input_time = \"1371473058\" # 2013-06-17 12:44:18 UTC\r\n    input_time = datetime.datetime.utcfromtimestamp(float(input_time))\r\n    input_time = input_time.replace(tzinfo=pytz.UTC)\r\n    print(babel_format_datetime(input_time, 'yyyy-MM-dd HH:mm:ss Z z'))\r\n    print(input_time.strftime('%Y-%m-%d %H:%M:%S %z %Z'))                                                \r\n```\r\n\r\noutputs:\r\n2013-06-17 12:44:18 +0000 +0000\r\n2013-06-17 12:44:18 +0000 UTC\r\non my system. "}}
{"actor":{"display_login":"akx"}}