{"action":"created","issue":{"url":"https://api.github.com/repos/simcen/alert_manager/issues/147","repository_url":"https://api.github.com/repos/simcen/alert_manager","labels_url":"https://api.github.com/repos/simcen/alert_manager/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/simcen/alert_manager/issues/147/comments","events_url":"https://api.github.com/repos/simcen/alert_manager/issues/147/events","html_url":"https://github.com/simcen/alert_manager/issues/147","id":178610395,"number":147,"title":"Timestamp Issue In modifyincidents.py","user":{"login":"johnfromthefuture","id":19210786,"avatar_url":"https://avatars.githubusercontent.com/u/19210786?v=3","gravatar_id":"","url":"https://api.github.com/users/johnfromthefuture","html_url":"https://github.com/johnfromthefuture","followers_url":"https://api.github.com/users/johnfromthefuture/followers","following_url":"https://api.github.com/users/johnfromthefuture/following{/other_user}","gists_url":"https://api.github.com/users/johnfromthefuture/gists{/gist_id}","starred_url":"https://api.github.com/users/johnfromthefuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnfromthefuture/subscriptions","organizations_url":"https://api.github.com/users/johnfromthefuture/orgs","repos_url":"https://api.github.com/users/johnfromthefuture/repos","events_url":"https://api.github.com/users/johnfromthefuture/events{/privacy}","received_events_url":"https://api.github.com/users/johnfromthefuture/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/simcen/alert_manager/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"simcen","id":560765,"avatar_url":"https://avatars.githubusercontent.com/u/560765?v=3","gravatar_id":"","url":"https://api.github.com/users/simcen","html_url":"https://github.com/simcen","followers_url":"https://api.github.com/users/simcen/followers","following_url":"https://api.github.com/users/simcen/following{/other_user}","gists_url":"https://api.github.com/users/simcen/gists{/gist_id}","starred_url":"https://api.github.com/users/simcen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simcen/subscriptions","organizations_url":"https://api.github.com/users/simcen/orgs","repos_url":"https://api.github.com/users/simcen/repos","events_url":"https://api.github.com/users/simcen/events{/privacy}","received_events_url":"https://api.github.com/users/simcen/received_events","type":"User","site_admin":false},"assignees":[{"login":"simcen","id":560765,"avatar_url":"https://avatars.githubusercontent.com/u/560765?v=3","gravatar_id":"","url":"https://api.github.com/users/simcen","html_url":"https://github.com/simcen","followers_url":"https://api.github.com/users/simcen/followers","following_url":"https://api.github.com/users/simcen/following{/other_user}","gists_url":"https://api.github.com/users/simcen/gists{/gist_id}","starred_url":"https://api.github.com/users/simcen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simcen/subscriptions","organizations_url":"https://api.github.com/users/simcen/orgs","repos_url":"https://api.github.com/users/simcen/repos","events_url":"https://api.github.com/users/simcen/events{/privacy}","received_events_url":"https://api.github.com/users/simcen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/simcen/alert_manager/milestones/6","html_url":"https://github.com/simcen/alert_manager/milestones/v2.1%20(Minor%20Release)","labels_url":"https://api.github.com/repos/simcen/alert_manager/milestones/6/labels","id":1049169,"number":6,"title":"v2.1 (Minor Release)","description":"","creator":{"login":"simcen","id":560765,"avatar_url":"https://avatars.githubusercontent.com/u/560765?v=3","gravatar_id":"","url":"https://api.github.com/users/simcen","html_url":"https://github.com/simcen","followers_url":"https://api.github.com/users/simcen/followers","following_url":"https://api.github.com/users/simcen/following{/other_user}","gists_url":"https://api.github.com/users/simcen/gists{/gist_id}","starred_url":"https://api.github.com/users/simcen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simcen/subscriptions","organizations_url":"https://api.github.com/users/simcen/orgs","repos_url":"https://api.github.com/users/simcen/repos","events_url":"https://api.github.com/users/simcen/events{/privacy}","received_events_url":"https://api.github.com/users/simcen/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":14,"state":"open","created_at":"2015-04-01T18:10:31Z","updated_at":"2016-09-23T07:06:54Z","due_on":"2016-10-10T00:00:00Z","closed_at":null},"comments":3,"created_at":"2016-09-22T13:30:49Z","updated_at":"2016-10-09T19:56:16Z","closed_at":null,"body":"I noted that when using `modifyincidents` command, my timestamps were incorrect when the `incident_change` was recorded. This is due to my user context in Splunk GUI being in EDT whereas I run my servers in UTC. For example, submitting a change at 9:20 AM would result in a timestamp: `time=2016-09-22T09:20:00.000000`. The lack of timezone causes splunk to index it as 5:20am instead.\r\n\r\nFor my environment, I fixed this by changing:\r\n`now = datetime.datetime.now().isoformat()`\r\nto:\r\n`now = datetime.datetime.utcnow().isoformat()`\r\n\r\nMaybe something like this would be best:\r\n`now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f%z')`"},"comment":{"url":"https://api.github.com/repos/simcen/alert_manager/issues/comments/252508570","html_url":"https://github.com/simcen/alert_manager/issues/147#issuecomment-252508570","issue_url":"https://api.github.com/repos/simcen/alert_manager/issues/147","id":252508570,"user":{"login":"simcen","id":560765,"avatar_url":"https://avatars.githubusercontent.com/u/560765?v=3","gravatar_id":"","url":"https://api.github.com/users/simcen","html_url":"https://github.com/simcen","followers_url":"https://api.github.com/users/simcen/followers","following_url":"https://api.github.com/users/simcen/following{/other_user}","gists_url":"https://api.github.com/users/simcen/gists{/gist_id}","starred_url":"https://api.github.com/users/simcen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simcen/subscriptions","organizations_url":"https://api.github.com/users/simcen/orgs","repos_url":"https://api.github.com/users/simcen/repos","events_url":"https://api.github.com/users/simcen/events{/privacy}","received_events_url":"https://api.github.com/users/simcen/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T19:56:16Z","updated_at":"2016-10-09T19:56:16Z","body":"Unfortunately, datetime.datetime.now() returns a naive timestamp which isn't aware of the timezone. I switched to\r\nnow = time.strftime(\"%Y-%m-%dT%H:%M:%S%z\", time.localtime())\r\nwhich serves now the right timestamp in an ISO format."}}
{"actor":{"display_login":"simcen"}}