{"action":"created","issue":{"url":"https://api.github.com/repos/braintree/braintree_python/issues/64","labels_url":"https://api.github.com/repos/braintree/braintree_python/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/braintree/braintree_python/issues/64/comments","events_url":"https://api.github.com/repos/braintree/braintree_python/issues/64/events","html_url":"https://github.com/braintree/braintree_python/issues/64","id":123335831,"number":64,"title":"datetime is not timezone aware","user":{"login":"tisdall","id":4029388,"avatar_url":"https://avatars.githubusercontent.com/u/4029388?v=3","gravatar_id":"","url":"https://api.github.com/users/tisdall","html_url":"https://github.com/tisdall","followers_url":"https://api.github.com/users/tisdall/followers","following_url":"https://api.github.com/users/tisdall/following{/other_user}","gists_url":"https://api.github.com/users/tisdall/gists{/gist_id}","starred_url":"https://api.github.com/users/tisdall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tisdall/subscriptions","organizations_url":"https://api.github.com/users/tisdall/orgs","repos_url":"https://api.github.com/users/tisdall/repos","events_url":"https://api.github.com/users/tisdall/events{/privacy}","received_events_url":"https://api.github.com/users/tisdall/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-21T18:48:00Z","updated_at":"2015-12-22T20:34:41Z","closed_at":"2015-12-22T20:34:41Z","body":"The docs mention than search results and such are always in UTC, but the datetime.datetime objects being created with this library are not timezone aware.  I can understand not wanting to add pytz just to accomplish this, so you could define your own UTC object (as shown in the datetime docs) that could be used in this case."},"comment":{"url":"https://api.github.com/repos/braintree/braintree_python/issues/comments/166723566","html_url":"https://github.com/braintree/braintree_python/issues/64#issuecomment-166723566","issue_url":"https://api.github.com/repos/braintree/braintree_python/issues/64","id":166723566,"user":{"login":"raymondberg","id":5155488,"avatar_url":"https://avatars.githubusercontent.com/u/5155488?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondberg","html_url":"https://github.com/raymondberg","followers_url":"https://api.github.com/users/raymondberg/followers","following_url":"https://api.github.com/users/raymondberg/following{/other_user}","gists_url":"https://api.github.com/users/raymondberg/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondberg/subscriptions","organizations_url":"https://api.github.com/users/raymondberg/orgs","repos_url":"https://api.github.com/users/raymondberg/repos","events_url":"https://api.github.com/users/raymondberg/events{/privacy}","received_events_url":"https://api.github.com/users/raymondberg/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T20:34:41Z","updated_at":"2015-12-22T20:34:41Z","body":"Thanks for the note, @tisdall. You are correct that timestamps from the Python library are currently returned as UTC values with no timestamp (default assumption being UTC). \r\n​\r\nWe will consider adding timezone specificity to the datetime objects in a future library release, but at this point introducing such a change would break a lot of backwards compatability. \r\n​\r\nFor others that may find this issue, here's the quickest `pytz` way to add timezone details to dates (assuming you know that the datetime is already naive UTC like in this library): \r\n​\r\n```\r\nimport pytz\r\n​\r\ntransaction = braintree.Transaction.find(\"my_transaction_id\")\r\ncreated_at_utc = transaction.created_at.replace(tzinfo=pytz.utc)\r\n```\r\n​\r\n​\r\nHappy Holidays!"}}