{"action":"created","issue":{"url":"https://api.github.com/repos/cznic/ql/issues/90","labels_url":"https://api.github.com/repos/cznic/ql/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/cznic/ql/issues/90/comments","events_url":"https://api.github.com/repos/cznic/ql/issues/90/events","html_url":"https://github.com/cznic/ql/issues/90","id":60105082,"number":90,"title":"formatTime tests are failing","user":{"login":"urandom","id":7908,"avatar_url":"https://avatars.githubusercontent.com/u/7908?v=3","gravatar_id":"","url":"https://api.github.com/users/urandom","html_url":"https://github.com/urandom","followers_url":"https://api.github.com/users/urandom/followers","following_url":"https://api.github.com/users/urandom/following{/other_user}","gists_url":"https://api.github.com/users/urandom/gists{/gist_id}","starred_url":"https://api.github.com/users/urandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urandom/subscriptions","organizations_url":"https://api.github.com/users/urandom/orgs","repos_url":"https://api.github.com/users/urandom/repos","events_url":"https://api.github.com/users/urandom/events{/privacy}","received_events_url":"https://api.github.com/users/urandom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cznic/ql/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"cznic","id":729580,"avatar_url":"https://avatars.githubusercontent.com/u/729580?v=3","gravatar_id":"","url":"https://api.github.com/users/cznic","html_url":"https://github.com/cznic","followers_url":"https://api.github.com/users/cznic/followers","following_url":"https://api.github.com/users/cznic/following{/other_user}","gists_url":"https://api.github.com/users/cznic/gists{/gist_id}","starred_url":"https://api.github.com/users/cznic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cznic/subscriptions","organizations_url":"https://api.github.com/users/cznic/orgs","repos_url":"https://api.github.com/users/cznic/repos","events_url":"https://api.github.com/users/cznic/events{/privacy}","received_events_url":"https://api.github.com/users/cznic/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-03-06T14:02:17Z","updated_at":"2015-03-06T14:18:11Z","closed_at":null,"body":"On my machine, all tests that invoke formatTime fail, because the result displays the expected time, but in a different time zone:\r\n```\r\n--- FAIL: TestMemStorage (0.06s)\r\n\tstorage_test.go:320: FAIL: test # 464\r\n\t\t-- 464\r\n\t\tBEGIN TRANSACTION;\r\n\t\t\tCREATE TABLE t (a time);\r\n\t\t\tINSERT INTO t VALUES\r\n\t\t\t\t(parseTime(\"Jan 2, 2006 at 3:04pm (MST)\", \"Nov 27, 2013 at 2:07pm (CET)\")),\r\n\t\t\t\t(parseTime(\"2006-Jan-02\", \"2013-Nov-27\")),\r\n\t\t\t;\r\n\t\tCOMMIT;\r\n\t\tSELECT formatTime(a, \"2006-01-02 15:04:05.999999999 -0700\") as a FROM t ORDER BY a;\r\n\t\t\r\n\t\t---- g\r\n\t\tsa\r\n\t\t[2013-11-27 00:00:00 +0000]\r\n\t\t[2013-11-27 15:07:00 +0200]\r\n\t\t---- e\r\n\t\tsa\r\n\t\t[2013-11-27 00:00:00 +0000]\r\n\t\t[2013-11-27 14:07:00 +0100]\r\n\t\t----\r\n--- FAIL: TestFileStorage (0.26s)\r\n\tstorage_test.go:320: FAIL: test # 464\r\n\t\t-- 464\r\n\t\tBEGIN TRANSACTION;\r\n\t\t\tCREATE TABLE t (a time);\r\n\t\t\tINSERT INTO t VALUES\r\n\t\t\t\t(parseTime(\"Jan 2, 2006 at 3:04pm (MST)\", \"Nov 27, 2013 at 2:07pm (CET)\")),\r\n\t\t\t\t(parseTime(\"2006-Jan-02\", \"2013-Nov-27\")),\r\n\t\t\t;\r\n\t\tCOMMIT;\r\n\t\tSELECT formatTime(a, \"2006-01-02 15:04:05.999999999 -0700\") as a FROM t ORDER BY a;\r\n\t\t\r\n\t\t---- g\r\n\t\tsa\r\n\t\t[2013-11-27 00:00:00 +0000]\r\n\t\t[2013-11-27 15:07:00 +0200]\r\n\t\t---- e\r\n\t\tsa\r\n\t\t[2013-11-27 00:00:00 +0000]\r\n\t\t[2013-11-27 14:07:00 +0100]\r\n\t\t----\r\n--- FAIL: TestOSFileStorage (0.28s)\r\n\tstorage_test.go:320: FAIL: test # 464\r\n\t\t-- 464\r\n\t\tBEGIN TRANSACTION;\r\n\t\t\tCREATE TABLE t (a time);\r\n\t\t\tINSERT INTO t VALUES\r\n\t\t\t\t(parseTime(\"Jan 2, 2006 at 3:04pm (MST)\", \"Nov 27, 2013 at 2:07pm (CET)\")),\r\n\t\t\t\t(parseTime(\"2006-Jan-02\", \"2013-Nov-27\")),\r\n\t\t\t;\r\n\t\tCOMMIT;\r\n\t\tSELECT formatTime(a, \"2006-01-02 15:04:05.999999999 -0700\") as a FROM t ORDER BY a;\r\n\t\t\r\n\t\t---- g\r\n\t\tsa\r\n\t\t[2013-11-27 00:00:00 +0000]\r\n\t\t[2013-11-27 15:07:00 +0200]\r\n\t\t---- e\r\n\t\tsa\r\n\t\t[2013-11-27 00:00:00 +0000]\r\n\t\t[2013-11-27 14:07:00 +0100]\r\n\t\t----\r\nFAIL\r\nexit status 1\r\nFAIL\tgithub.com/cznic/ql\t0.696s\r\n```"},"comment":{"url":"https://api.github.com/repos/cznic/ql/issues/comments/77564952","html_url":"https://github.com/cznic/ql/issues/90#issuecomment-77564952","issue_url":"https://api.github.com/repos/cznic/ql/issues/90","id":77564952,"user":{"login":"urandom","id":7908,"avatar_url":"https://avatars.githubusercontent.com/u/7908?v=3","gravatar_id":"","url":"https://api.github.com/users/urandom","html_url":"https://github.com/urandom","followers_url":"https://api.github.com/users/urandom/followers","following_url":"https://api.github.com/users/urandom/following{/other_user}","gists_url":"https://api.github.com/users/urandom/gists{/gist_id}","starred_url":"https://api.github.com/users/urandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urandom/subscriptions","organizations_url":"https://api.github.com/users/urandom/orgs","repos_url":"https://api.github.com/users/urandom/repos","events_url":"https://api.github.com/users/urandom/events{/privacy}","received_events_url":"https://api.github.com/users/urandom/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T14:18:11Z","updated_at":"2015-03-06T14:18:11Z","body":"p.s. Technically you don't even need to call t.Location() if you are going to store everything in UTC. Its sufficient to just call t.In(time.UTC) for every time object, regardless of the current location, as the function is just a glorified setter."}}