{"action":"created","issue":{"url":"https://api.github.com/repos/bitwalker/timex/issues/92","labels_url":"https://api.github.com/repos/bitwalker/timex/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/bitwalker/timex/issues/92/comments","events_url":"https://api.github.com/repos/bitwalker/timex/issues/92/events","html_url":"https://github.com/bitwalker/timex/issues/92","id":111314234,"number":92,"title":"Performance degradation of Date.local compared with older version of timex","user":{"login":"akira","id":43946,"avatar_url":"https://avatars.githubusercontent.com/u/43946?v=3","gravatar_id":"","url":"https://api.github.com/users/akira","html_url":"https://github.com/akira","followers_url":"https://api.github.com/users/akira/followers","following_url":"https://api.github.com/users/akira/following{/other_user}","gists_url":"https://api.github.com/users/akira/gists{/gist_id}","starred_url":"https://api.github.com/users/akira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akira/subscriptions","organizations_url":"https://api.github.com/users/akira/orgs","repos_url":"https://api.github.com/users/akira/repos","events_url":"https://api.github.com/users/akira/events{/privacy}","received_events_url":"https://api.github.com/users/akira/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitwalker/timex/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/bitwalker/timex/labels/level:advanced","name":"level:advanced","color":"e11d66"}],"state":"open","locked":false,"assignee":{"login":"bitwalker","id":955793,"avatar_url":"https://avatars.githubusercontent.com/u/955793?v=3","gravatar_id":"","url":"https://api.github.com/users/bitwalker","html_url":"https://github.com/bitwalker","followers_url":"https://api.github.com/users/bitwalker/followers","following_url":"https://api.github.com/users/bitwalker/following{/other_user}","gists_url":"https://api.github.com/users/bitwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/bitwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitwalker/subscriptions","organizations_url":"https://api.github.com/users/bitwalker/orgs","repos_url":"https://api.github.com/users/bitwalker/repos","events_url":"https://api.github.com/users/bitwalker/events{/privacy}","received_events_url":"https://api.github.com/users/bitwalker/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-10-14T03:19:53Z","updated_at":"2015-10-14T15:29:46Z","closed_at":null,"body":"There is a major performance degradation of date.local compared with older versions of timex.\r\n\r\nOn the older version, for example version 0.13.5, Date.local on my laptop:\r\n\r\n```\r\ndate.local                       1000000   3.11 µs/op\r\n```\r\n\r\nversus latest stable release, 0.19.5:\r\n```\r\ndate.local                         10000   135.24 µs/op\r\n```\r\n\r\nUsing this for benchmarking:\r\n```elixir\r\n  bench \"format date.local\" do\r\n    _ = Date.local\r\n    :ok\r\n  end\r\n```"},"comment":{"url":"https://api.github.com/repos/bitwalker/timex/issues/comments/148086532","html_url":"https://github.com/bitwalker/timex/issues/92#issuecomment-148086532","issue_url":"https://api.github.com/repos/bitwalker/timex/issues/92","id":148086532,"user":{"login":"bitwalker","id":955793,"avatar_url":"https://avatars.githubusercontent.com/u/955793?v=3","gravatar_id":"","url":"https://api.github.com/users/bitwalker","html_url":"https://github.com/bitwalker","followers_url":"https://api.github.com/users/bitwalker/followers","following_url":"https://api.github.com/users/bitwalker/following{/other_user}","gists_url":"https://api.github.com/users/bitwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/bitwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitwalker/subscriptions","organizations_url":"https://api.github.com/users/bitwalker/orgs","repos_url":"https://api.github.com/users/bitwalker/repos","events_url":"https://api.github.com/users/bitwalker/events{/privacy}","received_events_url":"https://api.github.com/users/bitwalker/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T15:29:46Z","updated_at":"2015-10-14T15:29:46Z","body":"@akira Is there any particular reason you use `Date.local` there instead of `Date.universal`? In general you should avoid using local time for anything that isn't user facing, particularly since you might have your application split across geographic areas where the local timezone is different. Within Timex, constructing a date in UTC is much much faster."}}