{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5002","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5002/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5002/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5002/events","html_url":"https://github.com/sequelize/sequelize/issues/5002","id":121059795,"number":5002,"title":"question regarding the postgreSQL timezones","user":{"login":"PavelPolyakov","id":839290,"avatar_url":"https://avatars.githubusercontent.com/u/839290?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelPolyakov","html_url":"https://github.com/PavelPolyakov","followers_url":"https://api.github.com/users/PavelPolyakov/followers","following_url":"https://api.github.com/users/PavelPolyakov/following{/other_user}","gists_url":"https://api.github.com/users/PavelPolyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelPolyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelPolyakov/subscriptions","organizations_url":"https://api.github.com/users/PavelPolyakov/orgs","repos_url":"https://api.github.com/users/PavelPolyakov/repos","events_url":"https://api.github.com/users/PavelPolyakov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelPolyakov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-08T17:40:09Z","updated_at":"2015-12-09T10:30:22Z","closed_at":"2015-12-09T10:30:21Z","body":"Hi,\r\n\r\nOpen question regarding the postgresql timezones.\r\n\r\nHere is the code:\r\n```javascript\r\nlet Data = server.storage.getModel('Data');\r\n\r\n            console.log(moment().format('YYYY-MM-DD HH:mm:ss'));\r\n            console.log(moment().toDate());\r\n\r\n            Data.create({\r\n                metric_id: 1,\r\n                client: 'HELLO',\r\n                created_at: moment().subtract(1,'days').format('YYYY-MM-DD HH:mm:ss'),\r\n                updated_at: moment().format('YYYY-MM-DD HH:mm:ss')\r\n            });\r\n```\r\n\r\nHere is what I see in the console:\r\n![image](https://cloud.githubusercontent.com/assets/839290/11662852/44a0d0c8-9dd9-11e5-9aee-316129fd51cb.png)\r\n\r\nI'm curious - why the INSERT query has dates in UTC, and which effect it can take on me? Whenever I do a query using 0xDBE, for example, I see the correct timestamps (the timezone is updated, however).\r\n![image](https://cloud.githubusercontent.com/assets/839290/11663142/d03daaba-9dda-11e5-8acc-9b170de7d009.png)\r\n\r\nIf I'll adjust my connection and set +01:00 timezone, then the INSERT query would show the \"correct\" dates in the console as well. However in the documentation it's stated, that ```timezone``` is used for the different thing.\r\n> The timezone used when converting a date from the database into a JavaScript date. \r\n\r\nCould you, please, tell me, if I should consider this as important or not? Would I met this some unexpected behaviours if I don't understand how it's working? Should I state the timezone in the options or I can skip it? (the only difference which I found, was the console log of the INSERT query).\r\n\r\nCurrently:\r\n```sql\r\nSELECT  current_setting('TIMEZONE')\r\n```\r\n\r\nreturns **Europe/Berlin**.\r\n\r\nAny thoughts are welcome.\r\n\r\nRegards,"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/163181411","html_url":"https://github.com/sequelize/sequelize/issues/5002#issuecomment-163181411","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/5002","id":163181411,"user":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T10:30:21Z","updated_at":"2015-12-09T10:30:21Z","body":"You're welcome :)"}}