{"action":"created","issue":{"url":"https://api.github.com/repos/yegor256/takes/issues/354","repository_url":"https://api.github.com/repos/yegor256/takes","labels_url":"https://api.github.com/repos/yegor256/takes/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/yegor256/takes/issues/354/comments","events_url":"https://api.github.com/repos/yegor256/takes/issues/354/events","html_url":"https://github.com/yegor256/takes/issues/354","id":91490189,"number":354,"title":"Incorrect setting the expiration date for a cookies","user":{"login":"dmzaytsev","id":9972909,"avatar_url":"https://avatars.githubusercontent.com/u/9972909?v=3","gravatar_id":"","url":"https://api.github.com/users/dmzaytsev","html_url":"https://github.com/dmzaytsev","followers_url":"https://api.github.com/users/dmzaytsev/followers","following_url":"https://api.github.com/users/dmzaytsev/following{/other_user}","gists_url":"https://api.github.com/users/dmzaytsev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmzaytsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmzaytsev/subscriptions","organizations_url":"https://api.github.com/users/dmzaytsev/orgs","repos_url":"https://api.github.com/users/dmzaytsev/repos","events_url":"https://api.github.com/users/dmzaytsev/events{/privacy}","received_events_url":"https://api.github.com/users/dmzaytsev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yegor256/takes/labels/30%20mins","name":"30 mins","color":"eb6421"},{"url":"https://api.github.com/repos/yegor256/takes/labels/@danff","name":"@danff","color":"009801"},{"url":"https://api.github.com/repos/yegor256/takes/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/yegor256/takes/labels/DEV","name":"DEV","color":"bfd4f3"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/yegor256/takes/milestones/1","html_url":"https://github.com/yegor256/takes/milestones/1.0","labels_url":"https://api.github.com/repos/yegor256/takes/milestones/1/labels","id":1069705,"number":1,"title":"1.0","description":"first fully working version","creator":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":143,"state":"open","created_at":"2015-04-16T00:55:10Z","updated_at":"2016-01-31T11:18:17Z","due_on":"2015-05-14T07:00:00Z","closed_at":null},"comments":10,"created_at":"2015-06-27T16:44:32Z","updated_at":"2016-02-03T15:59:11Z","closed_at":null,"body":"There are 3 classes using setting the expiration date for a cookies: RsFlash, PsCookie, RsReturn. All of them use the following code for expiration date calculation :\r\n\r\n```java\r\n String.format(\r\n                Locale.ENGLISH,\r\n                \"Expires=%1$ta, %1$td %1$tb %1$tY %1$tT GMT\",\r\n                new Date(\r\n                    System.currentTimeMillis()\r\n                        + TimeUnit.HOURS.toMillis(1L)\r\n                )\r\n            )\r\n```\r\nthe expiration date declared as GMT but the value uses local timezone. As result we have incorrect expiration date for a cookies. It is really can be seen if the server and the client are located in different time zones. I believe the expiration date must be converted to GMT before using in `String.format()`"},"comment":{"url":"https://api.github.com/repos/yegor256/takes/issues/comments/179310515","html_url":"https://github.com/yegor256/takes/issues/354#issuecomment-179310515","issue_url":"https://api.github.com/repos/yegor256/takes/issues/354","id":179310515,"user":{"login":"danff","id":16212428,"avatar_url":"https://avatars.githubusercontent.com/u/16212428?v=3","gravatar_id":"","url":"https://api.github.com/users/danff","html_url":"https://github.com/danff","followers_url":"https://api.github.com/users/danff/followers","following_url":"https://api.github.com/users/danff/following{/other_user}","gists_url":"https://api.github.com/users/danff/gists{/gist_id}","starred_url":"https://api.github.com/users/danff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danff/subscriptions","organizations_url":"https://api.github.com/users/danff/orgs","repos_url":"https://api.github.com/users/danff/repos","events_url":"https://api.github.com/users/danff/events{/privacy}","received_events_url":"https://api.github.com/users/danff/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T15:59:11Z","updated_at":"2016-02-03T15:59:11Z","body":"@davvd PR #562 has been creating to fix this issue."}}