{"action":"created","comment":{"url":"https://api.github.com/repos/github/VisualStudio/pulls/comments/52298226","id":52298226,"diff_hunk":"@@ -0,0 +1,39 @@\n+﻿using System;\n+using System.Globalization;\n+\n+namespace GitHub.UI\n+{\n+    public class DurationToStringConverter : ValueConverterMarkupExtension<DurationToStringConverter>\n+    {\n+        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)\n+        {\n+            const int year = 356;\n+            const int month = 30;\n+            const int day = 24;\n+            const int hour = 60;\n+            const int minute = 60;\n+\n+            TimeSpan duration;\n+            if (value is TimeSpan)\n+                duration = (TimeSpan)value;\n+            else if (value is DateTime)\n+                duration = DateTime.Now - (DateTime)value;","path":"src/GitHub.UI/Converters/DurationToStringConverter.cs","position":20,"original_position":20,"commit_id":"ebc4477085b1fdbc555afdfa6ea778082cbd27e5","original_commit_id":"ebc4477085b1fdbc555afdfa6ea778082cbd27e5","user":{"login":"shana","id":310137,"avatar_url":"https://avatars.githubusercontent.com/u/310137?v=3","gravatar_id":"","url":"https://api.github.com/users/shana","html_url":"https://github.com/shana","followers_url":"https://api.github.com/users/shana/followers","following_url":"https://api.github.com/users/shana/following{/other_user}","gists_url":"https://api.github.com/users/shana/gists{/gist_id}","starred_url":"https://api.github.com/users/shana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shana/subscriptions","organizations_url":"https://api.github.com/users/shana/orgs","repos_url":"https://api.github.com/users/shana/repos","events_url":"https://api.github.com/users/shana/events{/privacy}","received_events_url":"https://api.github.com/users/shana/received_events","type":"User","site_admin":true},"body":"Good question... data can come from any number of sources, most often from the github api, so it's going to be UTC. /me fixicates","created_at":"2016-02-09T11:54:05Z","updated_at":"2016-02-09T11:54:05Z","html_url":"https://github.com/github/VisualStudio/pull/217#discussion_r52298226","pull_request_url":"https://api.github.com/repos/github/VisualStudio/pulls/217","_links":{"self":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/comments/52298226"},"html":{"href":"https://github.com/github/VisualStudio/pull/217#discussion_r52298226"},"pull_request":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/217"}}},"pull_request":{"url":"https://api.github.com/repos/github/VisualStudio/pulls/217","id":58166873,"html_url":"https://github.com/github/VisualStudio/pull/217","diff_url":"https://github.com/github/VisualStudio/pull/217.diff","patch_url":"https://github.com/github/VisualStudio/pull/217.patch","issue_url":"https://api.github.com/repos/github/VisualStudio/issues/217","number":217,"state":"open","locked":false,"title":"A handy date to duration converter","user":{"login":"shana","id":310137,"avatar_url":"https://avatars.githubusercontent.com/u/310137?v=3","gravatar_id":"","url":"https://api.github.com/users/shana","html_url":"https://github.com/shana","followers_url":"https://api.github.com/users/shana/followers","following_url":"https://api.github.com/users/shana/following{/other_user}","gists_url":"https://api.github.com/users/shana/gists{/gist_id}","starred_url":"https://api.github.com/users/shana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shana/subscriptions","organizations_url":"https://api.github.com/users/shana/orgs","repos_url":"https://api.github.com/users/shana/repos","events_url":"https://api.github.com/users/shana/events{/privacy}","received_events_url":"https://api.github.com/users/shana/received_events","type":"User","site_admin":true},"body":"This will be used in the pr features.","created_at":"2016-02-03T16:57:30Z","updated_at":"2016-02-09T11:54:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c472ef9de5eca0e4e820404487776bcf56c68b47","assignee":{"login":"shana","id":310137,"avatar_url":"https://avatars.githubusercontent.com/u/310137?v=3","gravatar_id":"","url":"https://api.github.com/users/shana","html_url":"https://github.com/shana","followers_url":"https://api.github.com/users/shana/followers","following_url":"https://api.github.com/users/shana/following{/other_user}","gists_url":"https://api.github.com/users/shana/gists{/gist_id}","starred_url":"https://api.github.com/users/shana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shana/subscriptions","organizations_url":"https://api.github.com/users/shana/orgs","repos_url":"https://api.github.com/users/shana/repos","events_url":"https://api.github.com/users/shana/events{/privacy}","received_events_url":"https://api.github.com/users/shana/received_events","type":"User","site_admin":true},"milestone":null,"commits_url":"https://api.github.com/repos/github/VisualStudio/pulls/217/commits","review_comments_url":"https://api.github.com/repos/github/VisualStudio/pulls/217/comments","review_comment_url":"https://api.github.com/repos/github/VisualStudio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/VisualStudio/issues/217/comments","statuses_url":"https://api.github.com/repos/github/VisualStudio/statuses/ebc4477085b1fdbc555afdfa6ea778082cbd27e5","head":{"label":"github:feature/pr/duration-converter","ref":"feature/pr/duration-converter","sha":"ebc4477085b1fdbc555afdfa6ea778082cbd27e5","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":38325182,"name":"VisualStudio","full_name":"github/VisualStudio","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/VisualStudio","description":"GitHub Extension for Visual Studio","fork":false,"url":"https://api.github.com/repos/github/VisualStudio","forks_url":"https://api.github.com/repos/github/VisualStudio/forks","keys_url":"https://api.github.com/repos/github/VisualStudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/VisualStudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/VisualStudio/teams","hooks_url":"https://api.github.com/repos/github/VisualStudio/hooks","issue_events_url":"https://api.github.com/repos/github/VisualStudio/issues/events{/number}","events_url":"https://api.github.com/repos/github/VisualStudio/events","assignees_url":"https://api.github.com/repos/github/VisualStudio/assignees{/user}","branches_url":"https://api.github.com/repos/github/VisualStudio/branches{/branch}","tags_url":"https://api.github.com/repos/github/VisualStudio/tags","blobs_url":"https://api.github.com/repos/github/VisualStudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/VisualStudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/VisualStudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/VisualStudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/VisualStudio/statuses/{sha}","languages_url":"https://api.github.com/repos/github/VisualStudio/languages","stargazers_url":"https://api.github.com/repos/github/VisualStudio/stargazers","contributors_url":"https://api.github.com/repos/github/VisualStudio/contributors","subscribers_url":"https://api.github.com/repos/github/VisualStudio/subscribers","subscription_url":"https://api.github.com/repos/github/VisualStudio/subscription","commits_url":"https://api.github.com/repos/github/VisualStudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/VisualStudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/VisualStudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/VisualStudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/VisualStudio/contents/{+path}","compare_url":"https://api.github.com/repos/github/VisualStudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/VisualStudio/merges","archive_url":"https://api.github.com/repos/github/VisualStudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/VisualStudio/downloads","issues_url":"https://api.github.com/repos/github/VisualStudio/issues{/number}","pulls_url":"https://api.github.com/repos/github/VisualStudio/pulls{/number}","milestones_url":"https://api.github.com/repos/github/VisualStudio/milestones{/number}","notifications_url":"https://api.github.com/repos/github/VisualStudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/VisualStudio/labels{/name}","releases_url":"https://api.github.com/repos/github/VisualStudio/releases{/id}","deployments_url":"https://api.github.com/repos/github/VisualStudio/deployments","created_at":"2015-06-30T18:11:40Z","updated_at":"2016-02-08T21:48:03Z","pushed_at":"2016-02-09T00:03:07Z","git_url":"git://github.com/github/VisualStudio.git","ssh_url":"git@github.com:github/VisualStudio.git","clone_url":"https://github.com/github/VisualStudio.git","svn_url":"https://github.com/github/VisualStudio","homepage":"https://visualstudio.github.com","size":22103,"stargazers_count":374,"watchers_count":374,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":39,"forks":128,"open_issues":39,"watchers":374,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"070a3a5bd7e6e00110cce22919efadc311dbf746","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":38325182,"name":"VisualStudio","full_name":"github/VisualStudio","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/VisualStudio","description":"GitHub Extension for Visual Studio","fork":false,"url":"https://api.github.com/repos/github/VisualStudio","forks_url":"https://api.github.com/repos/github/VisualStudio/forks","keys_url":"https://api.github.com/repos/github/VisualStudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/VisualStudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/VisualStudio/teams","hooks_url":"https://api.github.com/repos/github/VisualStudio/hooks","issue_events_url":"https://api.github.com/repos/github/VisualStudio/issues/events{/number}","events_url":"https://api.github.com/repos/github/VisualStudio/events","assignees_url":"https://api.github.com/repos/github/VisualStudio/assignees{/user}","branches_url":"https://api.github.com/repos/github/VisualStudio/branches{/branch}","tags_url":"https://api.github.com/repos/github/VisualStudio/tags","blobs_url":"https://api.github.com/repos/github/VisualStudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/VisualStudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/VisualStudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/VisualStudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/VisualStudio/statuses/{sha}","languages_url":"https://api.github.com/repos/github/VisualStudio/languages","stargazers_url":"https://api.github.com/repos/github/VisualStudio/stargazers","contributors_url":"https://api.github.com/repos/github/VisualStudio/contributors","subscribers_url":"https://api.github.com/repos/github/VisualStudio/subscribers","subscription_url":"https://api.github.com/repos/github/VisualStudio/subscription","commits_url":"https://api.github.com/repos/github/VisualStudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/VisualStudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/VisualStudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/VisualStudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/VisualStudio/contents/{+path}","compare_url":"https://api.github.com/repos/github/VisualStudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/VisualStudio/merges","archive_url":"https://api.github.com/repos/github/VisualStudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/VisualStudio/downloads","issues_url":"https://api.github.com/repos/github/VisualStudio/issues{/number}","pulls_url":"https://api.github.com/repos/github/VisualStudio/pulls{/number}","milestones_url":"https://api.github.com/repos/github/VisualStudio/milestones{/number}","notifications_url":"https://api.github.com/repos/github/VisualStudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/VisualStudio/labels{/name}","releases_url":"https://api.github.com/repos/github/VisualStudio/releases{/id}","deployments_url":"https://api.github.com/repos/github/VisualStudio/deployments","created_at":"2015-06-30T18:11:40Z","updated_at":"2016-02-08T21:48:03Z","pushed_at":"2016-02-09T00:03:07Z","git_url":"git://github.com/github/VisualStudio.git","ssh_url":"git@github.com:github/VisualStudio.git","clone_url":"https://github.com/github/VisualStudio.git","svn_url":"https://github.com/github/VisualStudio","homepage":"https://visualstudio.github.com","size":22103,"stargazers_count":374,"watchers_count":374,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":39,"forks":128,"open_issues":39,"watchers":374,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/217"},"html":{"href":"https://github.com/github/VisualStudio/pull/217"},"issue":{"href":"https://api.github.com/repos/github/VisualStudio/issues/217"},"comments":{"href":"https://api.github.com/repos/github/VisualStudio/issues/217/comments"},"review_comments":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/217/comments"},"review_comment":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/217/commits"},"statuses":{"href":"https://api.github.com/repos/github/VisualStudio/statuses/ebc4477085b1fdbc555afdfa6ea778082cbd27e5"}}}}