{"action":"created","issue":{"url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/13","labels_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/13/comments","events_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/13/events","html_url":"https://github.com/quinnj/TimeZones.jl/pull/13","id":117804365,"number":13,"title":"Added TimeZone() constructor that doesn't require arguments","user":{"login":"JobJob","id":854183,"avatar_url":"https://avatars.githubusercontent.com/u/854183?v=3","gravatar_id":"","url":"https://api.github.com/users/JobJob","html_url":"https://github.com/JobJob","followers_url":"https://api.github.com/users/JobJob/followers","following_url":"https://api.github.com/users/JobJob/following{/other_user}","gists_url":"https://api.github.com/users/JobJob/gists{/gist_id}","starred_url":"https://api.github.com/users/JobJob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobJob/subscriptions","organizations_url":"https://api.github.com/users/JobJob/orgs","repos_url":"https://api.github.com/users/JobJob/repos","events_url":"https://api.github.com/users/JobJob/events{/privacy}","received_events_url":"https://api.github.com/users/JobJob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-19T12:30:11Z","updated_at":"2015-11-19T21:01:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/13","html_url":"https://github.com/quinnj/TimeZones.jl/pull/13","diff_url":"https://github.com/quinnj/TimeZones.jl/pull/13.diff","patch_url":"https://github.com/quinnj/TimeZones.jl/pull/13.patch"},"body":"Wasn't really sure what tests to add for this..."},"comment":{"url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/comments/158196530","html_url":"https://github.com/quinnj/TimeZones.jl/pull/13#issuecomment-158196530","issue_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/13","id":158196530,"user":{"login":"omus","id":1675958,"avatar_url":"https://avatars.githubusercontent.com/u/1675958?v=3","gravatar_id":"","url":"https://api.github.com/users/omus","html_url":"https://github.com/omus","followers_url":"https://api.github.com/users/omus/followers","following_url":"https://api.github.com/users/omus/following{/other_user}","gists_url":"https://api.github.com/users/omus/gists{/gist_id}","starred_url":"https://api.github.com/users/omus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omus/subscriptions","organizations_url":"https://api.github.com/users/omus/orgs","repos_url":"https://api.github.com/users/omus/repos","events_url":"https://api.github.com/users/omus/events{/privacy}","received_events_url":"https://api.github.com/users/omus/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T21:01:52Z","updated_at":"2015-11-19T21:01:52Z","body":"If you want a version of `now()` that does milliseconds you should use `Dates.unix2datetime(time())`. That will give you the current time in milliseconds in you system timezone.\r\n\r\nYou need to be careful with defaults values in methods. Setting `localzone()` in the `ZonedDateTime` definition like that will call `localzone()` once when the function is compiled and never again. If you were to change your system's timezone after compiling that function it would still default to the timezone from when the method was compiled.\r\n\r\nI think the solution is to make additional methods that exclude the timezone argument. That way we can call `localzone()` from within the method body and avoid the issue outlined above. If you want to implement what you're proposing you'd have to at least make two new methods:\r\n\r\n```julia\r\nZonedDateTime(local_dt::DateTime, is_dst::Bool; from_utc::Bool=false)\r\nZonedDateTime(local_dt::DateTime, occurrence::Integer=0; from_utc::Bool=false)\r\n```\r\n\r\nI'm unclear in what you'd want `nowtz()` to do. Is it essentially `now(tz::TimeZone)` where tz is optional?"}}