{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/10242","labels_url":"https://api.github.com/repos/golang/go/issues/10242/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10242/comments","events_url":"https://api.github.com/repos/golang/go/issues/10242/events","html_url":"https://github.com/golang/go/issues/10242","id":64141662,"number":10242,"title":"archive/zip make strange file timestamp","user":{"login":"mattn","id":10111,"avatar_url":"https://avatars.githubusercontent.com/u/10111?v=3","gravatar_id":"","url":"https://api.github.com/users/mattn","html_url":"https://github.com/mattn","followers_url":"https://api.github.com/users/mattn/followers","following_url":"https://api.github.com/users/mattn/following{/other_user}","gists_url":"https://api.github.com/users/mattn/gists{/gist_id}","starred_url":"https://api.github.com/users/mattn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattn/subscriptions","organizations_url":"https://api.github.com/users/mattn/orgs","repos_url":"https://api.github.com/users/mattn/repos","events_url":"https://api.github.com/users/mattn/events{/privacy}","received_events_url":"https://api.github.com/users/mattn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-25T01:17:49Z","updated_at":"2015-03-25T01:17:49Z","closed_at":null,"body":"```go\r\n\tout, err := ioutil.TempFile(os.TempDir(), \"zip\")\r\n\tif err != nil {\r\n\t\tt.Fatal(\"creating:\", err)\r\n\t}\r\n\tzw := NewWriter(out)\r\n\r\n\tin, err := os.Open(\"writer_test.go\")\r\n\tif err != nil {\r\n\t\tt.Fatal(\"opening:\", err)\r\n\t}\r\n\tinfo, err := in.Stat()\r\n\tif err != nil {\r\n\t\tt.Fatal(\"stat:\", err)\r\n\t}\r\n\tftime := info.ModTime().Unix()\r\n\r\n\theader, err := FileInfoHeader(info)\r\n\tif err != nil {\r\n\t\tt.Fatal(\"FileInfoHeader:\", err)\r\n\t}\r\n\theader.Name = info.Name()\r\n\tzf, err := zw.CreateHeader(header)\r\n\tif err != nil {\r\n\t\tt.Fatal(\"CreateHeader:\", err)\r\n\t}\r\n\tif _, err = io.Copy(zf, in); err != nil {\r\n\t\tt.Fatal(\"copying:\", err)\r\n\t}\r\n\tin.Close()\r\n\tzw.Close()\r\n\tout.Close()\r\n```\r\n\r\ntimestamp of the file in the zip, is UTC timezone. So +9 hours in my location.\r\n"}}