{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/16842","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/16842/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/16842/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/16842/events","html_url":"https://github.com/pandas-dev/pandas/issues/16842","id":241060622,"number":16842,"title":"Cannot use tz-aware origin in to_datetime()","user":{"login":"mcakes","id":10378200,"avatar_url":"https://avatars2.githubusercontent.com/u/10378200?v=3","gravatar_id":"","url":"https://api.github.com/users/mcakes","html_url":"https://github.com/mcakes","followers_url":"https://api.github.com/users/mcakes/followers","following_url":"https://api.github.com/users/mcakes/following{/other_user}","gists_url":"https://api.github.com/users/mcakes/gists{/gist_id}","starred_url":"https://api.github.com/users/mcakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcakes/subscriptions","organizations_url":"https://api.github.com/users/mcakes/orgs","repos_url":"https://api.github.com/users/mcakes/repos","events_url":"https://api.github.com/users/mcakes/events{/privacy}","received_events_url":"https://api.github.com/users/mcakes/received_events","type":"User","site_admin":false},"labels":[{"id":29648920,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Difficulty%20Novice","name":"Difficulty Novice","color":"fbca04","default":false},{"id":195648009,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Effort%20Low","name":"Effort Low","color":"006b75","default":false},{"id":42670965,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting","name":"Error Reporting","color":"ffa0ff","default":false},{"id":60458168,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Timezones","name":"Timezones","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pandas-dev/pandas/milestones/32","html_url":"https://github.com/pandas-dev/pandas/milestone/32","labels_url":"https://api.github.com/repos/pandas-dev/pandas/milestones/32/labels","id":933188,"number":32,"title":"Next Major Release","description":"","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars1.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":1236,"closed_issues":204,"state":"open","created_at":"2015-01-13T10:53:19Z","updated_at":"2017-07-09T12:04:03Z","due_on":"2017-08-31T07:00:00Z","closed_at":null},"comments":2,"created_at":"2017-07-06T19:27:11Z","updated_at":"2017-07-10T04:45:08Z","closed_at":null,"body":"#### Code Sample, a copy-pastable example if possible\r\n\r\n```python\r\n>>>import pandas as pd\r\n>>>pd.__version__\r\n'0.20.2'\r\n>>>from datetime import datetime, timezone\r\n>>>pd.to_datetime(1, unit='D', origin=datetime(2000, 1, 1))\r\nTimestamp('2000-01-02 00:00:00')\r\n>>>pd.to_datetime(1, unit='D', origin=datetime(2000, 1, 1, tzinfo=timezone.utc))\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\mchivers\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py\", line 2881, in run_code\r\n    exec(code_obj, self.user_global_ns, self.user_ns)\r\n  File \"<ipython-input-6-ba00dea82129>\", line 1, in <module>\r\n    pd.to_datetime(1, unit='D', origin=datetime(2000, 1, 1, tzinfo=timezone.utc))\r\n  File \"C:\\Users\\mchivers\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\pandas\\core\\tools\\datetimes.py\", line 487, in to_datetime\r\n    offset = tslib.Timestamp(origin) - tslib.Timestamp(0)\r\n  File \"pandas\\_libs\\tslib.pyx\", line 1244, in pandas._libs.tslib._Timestamp.__sub__ (pandas\\_libs\\tslib.c:23487)\r\nTypeError: Timestamp subtraction must have the same timezones or no timezones\r\n```\r\n#### Problem description\r\nAttempting to use a timezone aware origin argument in `pandas.to_datetime()` causes an error due to the line\r\n`offset = tslib.Timestamp(origin) - tslib.Timestamp(0)`\r\n\r\nShould this be allowed? "},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/314003709","html_url":"https://github.com/pandas-dev/pandas/issues/16842#issuecomment-314003709","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/16842","id":314003709,"user":{"login":"manikbhandari","id":17298127,"avatar_url":"https://avatars3.githubusercontent.com/u/17298127?v=3","gravatar_id":"","url":"https://api.github.com/users/manikbhandari","html_url":"https://github.com/manikbhandari","followers_url":"https://api.github.com/users/manikbhandari/followers","following_url":"https://api.github.com/users/manikbhandari/following{/other_user}","gists_url":"https://api.github.com/users/manikbhandari/gists{/gist_id}","starred_url":"https://api.github.com/users/manikbhandari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manikbhandari/subscriptions","organizations_url":"https://api.github.com/users/manikbhandari/orgs","repos_url":"https://api.github.com/users/manikbhandari/repos","events_url":"https://api.github.com/users/manikbhandari/events{/privacy}","received_events_url":"https://api.github.com/users/manikbhandari/received_events","type":"User","site_admin":false},"created_at":"2017-07-10T04:45:08Z","updated_at":"2017-07-10T04:45:08Z","body":"I would like to take this up if no one else is working on it!"}}
{"actor":{"display_login":"manikbhandari"}}