{"action":"created","comment":{"url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/comments/36990076","id":36990076,"diff_hunk":"@@ -0,0 +1,98 @@\n+import Base.Dates: Slot, AbstractTime, FixedWidthSlot, DelimitedSlot, DayOfWeekSlot, duplicates, getslot, periodisless\n+\n+Base.string(tz::TimeZone) = string(tz.name)\n+Base.show(io::IO,tz::VariableTimeZone) = print(io,string(tz))\n+\n+function Base.string(dt::ZonedDateTime)\n+    v = offset(dt.zone).value\n+    h, v = divrem(v, 3600)\n+    m, s  = divrem(abs(v), 60)\n+\n+    hh = @sprintf(\"%+03i\", h)\n+    mm = lpad(m, 2, \"0\")\n+    ss = s != 0 ? lpad(s, 2, \"0\") : \"\"\n+\n+    local_dt = localtime(dt)\n+    return \"$local_dt$hh:$mm$(ss)\"\n+end\n+Base.show(io::IO,dt::ZonedDateTime) = print(io,string(dt))\n+\n+\n+# DateTime Parsing\n+\n+# Note: Ideally Base.Dates.Slot definition should just be: \"abstract Slot{P<:Any}\" which\n+# would allow for custom Slots to be of any type.\n+immutable TimeZoneSlot <: AbstractTime end","path":"src/timezones/io.jl","position":25,"original_position":25,"commit_id":"6ae92c523d9726709f947ebe9b9e84ff3bd4b07d","original_commit_id":"6ae92c523d9726709f947ebe9b9e84ff3bd4b07d","user":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"body":"Yeah, we're really due for another iteration on the Base.Dates io.jl machinery. There are a few open issues about parsing issues and I've just been putting off really digging in (because parsing isn't my favorite activity!). If you have ideas/code here, it'd be much appreciated in Base.","created_at":"2015-08-13T15:48:22Z","updated_at":"2015-08-13T15:48:22Z","html_url":"https://github.com/quinnj/TimeZones.jl/pull/3#discussion_r36990076","pull_request_url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/comments/36990076"},"html":{"href":"https://github.com/quinnj/TimeZones.jl/pull/3#discussion_r36990076"},"pull_request":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3","id":42357888,"html_url":"https://github.com/quinnj/TimeZones.jl/pull/3","diff_url":"https://github.com/quinnj/TimeZones.jl/pull/3.diff","patch_url":"https://github.com/quinnj/TimeZones.jl/pull/3.patch","issue_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/3","number":3,"state":"open","locked":false,"title":"Implemented TimeZones Interface","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},"body":"Implemented the full TimeZones interface. There are allot of changes so I'll point form the important changes:\r\n\r\n* TimeZones now requires Base.Dates which requires Julia 0.4 pre-release and above\r\n* TZ data compiling reworked due to bugs\r\n* Added tests\r\n* Built TimeZone types are serialized and saved to disk for fast loading\r\n* Implemented `ZonedDateTime` which is the timezone-aware version of `DateTime`\r\n* Implemented calendrical arithmetic for `ZonedDateTime` (see README)\r\n* Updated Travis script and added Coveralls and Codecov (91% coverage)","created_at":"2015-08-13T14:39:38Z","updated_at":"2015-08-13T15:48:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44ee4c275d3f2b58080b8bc1da3e22f8bc8d4e8f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3/commits","review_comments_url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3/comments","review_comment_url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/3/comments","statuses_url":"https://api.github.com/repos/quinnj/TimeZones.jl/statuses/6ae92c523d9726709f947ebe9b9e84ff3bd4b07d","head":{"label":"quinnj:interface","ref":"interface","sha":"6ae92c523d9726709f947ebe9b9e84ff3bd4b07d","user":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"repo":{"id":20328157,"name":"TimeZones.jl","full_name":"quinnj/TimeZones.jl","owner":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quinnj/TimeZones.jl","description":"Olsen Timezone Database Access for the Julia Programming Language","fork":false,"url":"https://api.github.com/repos/quinnj/TimeZones.jl","forks_url":"https://api.github.com/repos/quinnj/TimeZones.jl/forks","keys_url":"https://api.github.com/repos/quinnj/TimeZones.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quinnj/TimeZones.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quinnj/TimeZones.jl/teams","hooks_url":"https://api.github.com/repos/quinnj/TimeZones.jl/hooks","issue_events_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/events{/number}","events_url":"https://api.github.com/repos/quinnj/TimeZones.jl/events","assignees_url":"https://api.github.com/repos/quinnj/TimeZones.jl/assignees{/user}","branches_url":"https://api.github.com/repos/quinnj/TimeZones.jl/branches{/branch}","tags_url":"https://api.github.com/repos/quinnj/TimeZones.jl/tags","blobs_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quinnj/TimeZones.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/quinnj/TimeZones.jl/languages","stargazers_url":"https://api.github.com/repos/quinnj/TimeZones.jl/stargazers","contributors_url":"https://api.github.com/repos/quinnj/TimeZones.jl/contributors","subscribers_url":"https://api.github.com/repos/quinnj/TimeZones.jl/subscribers","subscription_url":"https://api.github.com/repos/quinnj/TimeZones.jl/subscription","commits_url":"https://api.github.com/repos/quinnj/TimeZones.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/quinnj/TimeZones.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/quinnj/TimeZones.jl/contents/{+path}","compare_url":"https://api.github.com/repos/quinnj/TimeZones.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quinnj/TimeZones.jl/merges","archive_url":"https://api.github.com/repos/quinnj/TimeZones.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quinnj/TimeZones.jl/downloads","issues_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues{/number}","pulls_url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/quinnj/TimeZones.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/quinnj/TimeZones.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quinnj/TimeZones.jl/labels{/name}","releases_url":"https://api.github.com/repos/quinnj/TimeZones.jl/releases{/id}","created_at":"2014-05-30T12:11:24Z","updated_at":"2015-08-12T18:30:09Z","pushed_at":"2015-08-13T14:39:38Z","git_url":"git://github.com/quinnj/TimeZones.jl.git","ssh_url":"git@github.com:quinnj/TimeZones.jl.git","clone_url":"https://github.com/quinnj/TimeZones.jl.git","svn_url":"https://github.com/quinnj/TimeZones.jl","homepage":null,"size":516,"stargazers_count":4,"watchers_count":4,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"quinnj:master","ref":"master","sha":"7047b270fc6a5259abafd942ad8a7bf62d20bf41","user":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"repo":{"id":20328157,"name":"TimeZones.jl","full_name":"quinnj/TimeZones.jl","owner":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quinnj/TimeZones.jl","description":"Olsen Timezone Database Access for the Julia Programming Language","fork":false,"url":"https://api.github.com/repos/quinnj/TimeZones.jl","forks_url":"https://api.github.com/repos/quinnj/TimeZones.jl/forks","keys_url":"https://api.github.com/repos/quinnj/TimeZones.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quinnj/TimeZones.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quinnj/TimeZones.jl/teams","hooks_url":"https://api.github.com/repos/quinnj/TimeZones.jl/hooks","issue_events_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/events{/number}","events_url":"https://api.github.com/repos/quinnj/TimeZones.jl/events","assignees_url":"https://api.github.com/repos/quinnj/TimeZones.jl/assignees{/user}","branches_url":"https://api.github.com/repos/quinnj/TimeZones.jl/branches{/branch}","tags_url":"https://api.github.com/repos/quinnj/TimeZones.jl/tags","blobs_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quinnj/TimeZones.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/quinnj/TimeZones.jl/languages","stargazers_url":"https://api.github.com/repos/quinnj/TimeZones.jl/stargazers","contributors_url":"https://api.github.com/repos/quinnj/TimeZones.jl/contributors","subscribers_url":"https://api.github.com/repos/quinnj/TimeZones.jl/subscribers","subscription_url":"https://api.github.com/repos/quinnj/TimeZones.jl/subscription","commits_url":"https://api.github.com/repos/quinnj/TimeZones.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/quinnj/TimeZones.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/quinnj/TimeZones.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/quinnj/TimeZones.jl/contents/{+path}","compare_url":"https://api.github.com/repos/quinnj/TimeZones.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quinnj/TimeZones.jl/merges","archive_url":"https://api.github.com/repos/quinnj/TimeZones.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quinnj/TimeZones.jl/downloads","issues_url":"https://api.github.com/repos/quinnj/TimeZones.jl/issues{/number}","pulls_url":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/quinnj/TimeZones.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/quinnj/TimeZones.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quinnj/TimeZones.jl/labels{/name}","releases_url":"https://api.github.com/repos/quinnj/TimeZones.jl/releases{/id}","created_at":"2014-05-30T12:11:24Z","updated_at":"2015-08-12T18:30:09Z","pushed_at":"2015-08-13T14:39:38Z","git_url":"git://github.com/quinnj/TimeZones.jl.git","ssh_url":"git@github.com:quinnj/TimeZones.jl.git","clone_url":"https://github.com/quinnj/TimeZones.jl.git","svn_url":"https://github.com/quinnj/TimeZones.jl","homepage":null,"size":516,"stargazers_count":4,"watchers_count":4,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3"},"html":{"href":"https://github.com/quinnj/TimeZones.jl/pull/3"},"issue":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/3"},"comments":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/quinnj/TimeZones.jl/statuses/6ae92c523d9726709f947ebe9b9e84ff3bd4b07d"}}}}