{"action":"closed","issue":{"url":"https://api.github.com/repos/go-sql-driver/mysql/issues/482","repository_url":"https://api.github.com/repos/go-sql-driver/mysql","labels_url":"https://api.github.com/repos/go-sql-driver/mysql/issues/482/labels{/name}","comments_url":"https://api.github.com/repos/go-sql-driver/mysql/issues/482/comments","events_url":"https://api.github.com/repos/go-sql-driver/mysql/issues/482/events","html_url":"https://github.com/go-sql-driver/mysql/issues/482","id":178962850,"number":482,"title":"Timezones when converting from time.Time to datetime","user":{"login":"lorin","id":446305,"avatar_url":"https://avatars.githubusercontent.com/u/446305?v=3","gravatar_id":"","url":"https://api.github.com/users/lorin","html_url":"https://github.com/lorin","followers_url":"https://api.github.com/users/lorin/followers","following_url":"https://api.github.com/users/lorin/following{/other_user}","gists_url":"https://api.github.com/users/lorin/gists{/gist_id}","starred_url":"https://api.github.com/users/lorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorin/subscriptions","organizations_url":"https://api.github.com/users/lorin/orgs","repos_url":"https://api.github.com/users/lorin/repos","events_url":"https://api.github.com/users/lorin/events{/privacy}","received_events_url":"https://api.github.com/users/lorin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/go-sql-driver/mysql/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-23T20:07:45Z","updated_at":"2016-09-28T06:24:48Z","closed_at":"2016-09-28T06:24:48Z","body":"The README discusses how the driver handles conversion from mysql's DATETIME to Go time.Time, but I couldn't find info on conversions in the other direction. For example, let's say I have a table like this:\r\n\r\n```\r\nCREATE table observations (\r\n  when DATETIME NOT NULL,\r\n  desc VARCHAR(100) NOT NULL\r\n);\r\n```\r\n\r\nThen I execute an INSERT query with a time.Time:\r\n\r\n```\r\ndb = ...\r\nt := time.Now()\r\ndb.Exec(\"INSERT INTO observations (when, desc) VALUES (?, ?)\", t, \"sunny\")\r\n```\r\n\r\nDoes the driver convert `t` into the timezone specified by the `loc` parameter? Does the conversion behavior depend on the value of the`parseTime` parameter?"}}
{"actor":{"display_login":"arnehormann"}}