{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/29995752","id":29995752,"diff_hunk":"@@ -343,3 +344,19 @@ func readBody(stream io.ReadCloser, statusCode int, err error) ([]byte, int, err\n \t}\n \treturn body, statusCode, nil\n }\n+\n+// getTimestamp tries to parse given string as RFC3339 time\n+// or Unix timestamp, if successful returns a Unix timestamp\n+// as string otherwise returns value back.\n+func getTimestamp(value string) string {\n+\tformat := timeutils.RFC3339NanoFixed\n+\tloc := time.FixedZone(time.Now().Zone())\n+\tif len(value) < len(format) {\n+\t\tformat = format[:len(value)]\n+\t}\n+\tif t, err := time.ParseInLocation(format, value, loc); err == nil {","path":"api/client/utils.go","position":22,"original_position":22,"commit_id":"23b896ae3f0de3a506dbd342c00558d5a99aa319","original_commit_id":"23b896ae3f0de3a506dbd342c00558d5a99aa319","user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"body":"nit but I'll just do\r\n```\r\nt, err := time.ParseInLocation(format, value, loc)\r\nif err != nil {\r\n    return value\r\n}\r\nreturn strconv.FormatInt(t.Unix(), 10)\r\n```","created_at":"2015-05-09T19:57:47Z","updated_at":"2015-05-09T19:57:47Z","html_url":"https://github.com/docker/docker/pull/12362#discussion_r29995752","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/12362","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/29995752"},"html":{"href":"https://github.com/docker/docker/pull/12362#discussion_r29995752"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/12362"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/12362","id":33232405,"html_url":"https://github.com/docker/docker/pull/12362","diff_url":"https://github.com/docker/docker/pull/12362.diff","patch_url":"https://github.com/docker/docker/pull/12362.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/12362","number":12362,"state":"open","locked":false,"title":"Add --since argument to docker logs cmd","user":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"body":"Added `--since` argument to `docker logs` command. Accept unix\r\ntimestamps and shows logs only created after the specified date.\r\n\r\nDefault value is 0 and passing default value or not specifying\r\nthe value in the request causes parameter to be ignored (behavior\r\nprior to this change).\r\n\r\nUpdated:\r\n- [x] cli: by default sends 0, otherwise unix timestamp\r\n- [x] remote api: updated remote api and docs\r\n- [x] engine: updated server to filter logs by date\r\n- [x] integration-cli: added simple test and a test with -f and a future timestamp\r\n- [x] docs: updated remote api, cli.md, manpage and completion scripts\r\n\r\nSigned-off-by: Ahmet Alp Balkan","created_at":"2015-04-14T07:30:54Z","updated_at":"2015-05-09T19:57:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d675d6ab80e76c5b10668f2af1e34d9a2ef6491e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/12362/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/12362/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/12362/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/23b896ae3f0de3a506dbd342c00558d5a99aa319","head":{"label":"ahmetalpbalkan:logs/since","ref":"logs/since","sha":"23b896ae3f0de3a506dbd342c00558d5a99aa319","user":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"repo":{"id":30384043,"name":"docker","full_name":"ahmetalpbalkan/docker","owner":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahmetalpbalkan/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/ahmetalpbalkan/docker","forks_url":"https://api.github.com/repos/ahmetalpbalkan/docker/forks","keys_url":"https://api.github.com/repos/ahmetalpbalkan/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahmetalpbalkan/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahmetalpbalkan/docker/teams","hooks_url":"https://api.github.com/repos/ahmetalpbalkan/docker/hooks","issue_events_url":"https://api.github.com/repos/ahmetalpbalkan/docker/issues/events{/number}","events_url":"https://api.github.com/repos/ahmetalpbalkan/docker/events","assignees_url":"https://api.github.com/repos/ahmetalpbalkan/docker/assignees{/user}","branches_url":"https://api.github.com/repos/ahmetalpbalkan/docker/branches{/branch}","tags_url":"https://api.github.com/repos/ahmetalpbalkan/docker/tags","blobs_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahmetalpbalkan/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/ahmetalpbalkan/docker/languages","stargazers_url":"https://api.github.com/repos/ahmetalpbalkan/docker/stargazers","contributors_url":"https://api.github.com/repos/ahmetalpbalkan/docker/contributors","subscribers_url":"https://api.github.com/repos/ahmetalpbalkan/docker/subscribers","subscription_url":"https://api.github.com/repos/ahmetalpbalkan/docker/subscription","commits_url":"https://api.github.com/repos/ahmetalpbalkan/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahmetalpbalkan/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahmetalpbalkan/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahmetalpbalkan/docker/contents/{+path}","compare_url":"https://api.github.com/repos/ahmetalpbalkan/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahmetalpbalkan/docker/merges","archive_url":"https://api.github.com/repos/ahmetalpbalkan/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahmetalpbalkan/docker/downloads","issues_url":"https://api.github.com/repos/ahmetalpbalkan/docker/issues{/number}","pulls_url":"https://api.github.com/repos/ahmetalpbalkan/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/ahmetalpbalkan/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/ahmetalpbalkan/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahmetalpbalkan/docker/labels{/name}","releases_url":"https://api.github.com/repos/ahmetalpbalkan/docker/releases{/id}","created_at":"2015-02-05T23:23:10Z","updated_at":"2015-04-14T07:16:29Z","pushed_at":"2015-05-09T19:28:43Z","git_url":"git://github.com/ahmetalpbalkan/docker.git","ssh_url":"git@github.com:ahmetalpbalkan/docker.git","clone_url":"https://github.com/ahmetalpbalkan/docker.git","svn_url":"https://github.com/ahmetalpbalkan/docker","homepage":"http://www.docker.com","size":53315,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"340fd140e67901c8b5ad9d59c6fb693f6bbcffde","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-05-09T19:08:15Z","pushed_at":"2015-05-09T19:36:17Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":204692,"stargazers_count":21484,"watchers_count":21484,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5039,"mirror_url":null,"open_issues_count":954,"forks":5039,"open_issues":954,"watchers":21484,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/12362"},"html":{"href":"https://github.com/docker/docker/pull/12362"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/12362"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/12362/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/12362/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/12362/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/23b896ae3f0de3a506dbd342c00558d5a99aa319"}}}}