{"action":"created","issue":{"url":"https://api.github.com/repos/manahl/arctic/issues/59","labels_url":"https://api.github.com/repos/manahl/arctic/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/manahl/arctic/issues/59/comments","events_url":"https://api.github.com/repos/manahl/arctic/issues/59/events","html_url":"https://github.com/manahl/arctic/issues/59","id":120600496,"number":59,"title":"Unit test failure in bitemporal store","user":{"login":"bmoscon","id":1280059,"avatar_url":"https://avatars.githubusercontent.com/u/1280059?v=3","gravatar_id":"","url":"https://api.github.com/users/bmoscon","html_url":"https://github.com/bmoscon","followers_url":"https://api.github.com/users/bmoscon/followers","following_url":"https://api.github.com/users/bmoscon/following{/other_user}","gists_url":"https://api.github.com/users/bmoscon/gists{/gist_id}","starred_url":"https://api.github.com/users/bmoscon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmoscon/subscriptions","organizations_url":"https://api.github.com/users/bmoscon/orgs","repos_url":"https://api.github.com/users/bmoscon/repos","events_url":"https://api.github.com/users/bmoscon/events{/privacy}","received_events_url":"https://api.github.com/users/bmoscon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-06T01:27:17Z","updated_at":"2015-12-18T17:12:07Z","closed_at":null,"body":"   def test_last_update(bitemporal_library):\r\n        bitemporal_library.update('spam', ts1, as_of=dt(2015, 1, 1))\r\n        bitemporal_library.update('spam', ts1, as_of=dt(2015, 1, 2))\r\n>       assert bitemporal_library.read('spam').last_updated == dt(2015, 1, 2)\r\nE       assert Timestamp('2015-01-02 05:00:00') == datetime.datetime(2015, 1, 2, 0, 0)\r\nE        +  where Timestamp('2015-01-02 05:00:00') = BitemporalItem(symbol='spam', library=u'arctic_test.TEST', data=              ...:06:11.040   3.0, metadata=None, last_updated=Timestamp('2015-01-02 05:00:00')).last_updated\r\nE        +    where BitemporalItem(symbol='spam', library=u'arctic_test.TEST', data=              ...:06:11.040   3.0, metadata=None, last_updated=Timestamp('2015-01-02 05:00:00')) = <bound method BitemporalStore.read of <arctic.store.bitemporal_store.BitemporalStore object at 0x7f1c2da62650>>('spam')\r\nE        +      where <bound method BitemporalStore.read of <arctic.store.bitemporal_store.BitemporalStore object at 0x7f1c2da62650>> = <arctic.store.bitemporal_store.BitemporalStore object at 0x7f1c2da62650>.read\r\nE        +  and   datetime.datetime(2015, 1, 2, 0, 0) = dt(2015, 1, 2)\r\n\r\ntests/integration/store/test_bitemporal_store.py:60: AssertionError\r\n\r\n\r\n\r\nBasically we're comparing Timestamp('2015-01-02 05:00:00') to Timestamp('2015-01-02 00:00:00')\r\n\r\n\r\nNot sure why last updated is reporting 05:00:00 as the timestamp. Is this because I'm not running my machine on GMT or is this some other anomaly? Doesn't appear version related (I tried with 1.9.2/0.16.2 and latest, same behavior)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/manahl/arctic/issues/comments/165843144","html_url":"https://github.com/manahl/arctic/issues/59#issuecomment-165843144","issue_url":"https://api.github.com/repos/manahl/arctic/issues/59","id":165843144,"user":{"login":"AdrianTeng","id":6933071,"avatar_url":"https://avatars.githubusercontent.com/u/6933071?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianTeng","html_url":"https://github.com/AdrianTeng","followers_url":"https://api.github.com/users/AdrianTeng/followers","following_url":"https://api.github.com/users/AdrianTeng/following{/other_user}","gists_url":"https://api.github.com/users/AdrianTeng/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianTeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianTeng/subscriptions","organizations_url":"https://api.github.com/users/AdrianTeng/orgs","repos_url":"https://api.github.com/users/AdrianTeng/repos","events_url":"https://api.github.com/users/AdrianTeng/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianTeng/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T17:12:06Z","updated_at":"2015-12-18T17:12:06Z","body":"Hi Bryant, this does look like timezone issue.\r\n\r\nThe `as_of` column is timezone aware:\r\n\r\n```\r\n        local_tz = mktz()\r\n        if not as_of:\r\n            as_of = dt.now()\r\n        if as_of.tzinfo is None:\r\n            as_of = as_of.replace(tzinfo=local_tz)\r\n```\r\nIf `mktz()` and `dt.now()` is reporting inconsistent data (say, `dt.now()` gives Boston time and `mktz()` gives London timezone). Would you mind confirming those two functions' output on your machine?"}}