{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/1412","repository_url":"https://api.github.com/repos/elixir-lang/ecto","labels_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1412/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1412/comments","events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1412/events","html_url":"https://github.com/elixir-lang/ecto/issues/1412","id":152931129,"number":1412,"title":"Ecto 2 rc.4 breaks calecto","user":{"login":"princemaple","id":1329716,"avatar_url":"https://avatars.githubusercontent.com/u/1329716?v=3","gravatar_id":"","url":"https://api.github.com/users/princemaple","html_url":"https://github.com/princemaple","followers_url":"https://api.github.com/users/princemaple/followers","following_url":"https://api.github.com/users/princemaple/following{/other_user}","gists_url":"https://api.github.com/users/princemaple/gists{/gist_id}","starred_url":"https://api.github.com/users/princemaple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/princemaple/subscriptions","organizations_url":"https://api.github.com/users/princemaple/orgs","repos_url":"https://api.github.com/users/princemaple/repos","events_url":"https://api.github.com/users/princemaple/events{/privacy}","received_events_url":"https://api.github.com/users/princemaple/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-05-04T05:12:49Z","updated_at":"2016-05-07T01:28:41Z","closed_at":"2016-05-04T14:07:52Z","body":"cc @lau not sure if it's something that needs to be updated in https://github.com/lau/calecto\r\n\r\n### Environment\r\n\r\n* Elixir version (elixir -v): 1.2.5\r\n* Database and version (PostgreSQL 9.4, MongoDB 3.2, etc.): PostgreSQL 9.5\r\n* Ecto version (mix deps): 2.0.0-rc.4\r\n\r\n### Current behavior\r\n\r\nI got this error after updating to ecto 2 rc4 from ecto 2 rc3\r\n```\r\n** (exit) an exception was raised:\r\n    ** (Ecto.ChangeError) value `#Ecto.DateTime<2016-05-04 05:07:33.776539>` for `App.Group.updated_at` in `insert` does not match type Calecto.DateTimeUTC\r\n        (ecto) lib/ecto/repo/schema.ex:610: Ecto.Repo.Schema.dump_field!/6\r\n        (ecto) lib/ecto/repo/schema.ex:619: anonymous fn/6 in Ecto.Repo.Schema.dump_fields!/5\r\n        (elixir) lib/enum.ex:1473: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n        (ecto) lib/ecto/repo/schema.ex:617: Ecto.Repo.Schema.dump_fields!/5\r\n        (ecto) lib/ecto/repo/schema.ex:567: Ecto.Repo.Schema.dump_changes!/6\r\n        (ecto) lib/ecto/repo/schema.ex:182: anonymous fn/11 in Ecto.Repo.Schema.do_insert/4\r\n        (ecto) lib/ecto/repo/schema.ex:595: anonymous fn/3 in Ecto.Repo.Schema.wrap_in_transaction/6\r\n        (db_connection) lib/db_connection.ex:1164: DBConnection.transaction_nested/2\r\n        (db_connection) lib/db_connection.ex:1030: DBConnection.transaction_meter/3\r\n        (db_connection) lib/db_connection.ex:766: DBConnection.transaction/3\r\n        (ecto) lib/ecto/multi.ex:374: Ecto.Multi.apply_operation/4\r\n        (elixir) lib/enum.ex:1473: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n        (ecto) lib/ecto/adapters/sql.ex:462: anonymous fn/3 in Ecto.Adapters.SQL.do_transaction/3\r\n        (db_connection) lib/db_connection.ex:1079: DBConnection.transaction_run/4\r\n        (db_connection) lib/db_connection.ex:1009: DBConnection.run_begin/3\r\n        (db_connection) lib/db_connection.ex:766: DBConnection.transaction/3\r\n        (ecto) lib/ecto/repo/queryable.ex:27: Ecto.Repo.Queryable.transaction/4\r\n        (app) web/controllers/api/v1/group_controller.ex:12: App.API.V1.GroupController.create/2\r\n        (app) web/controllers/api/v1/group_controller.ex:1: App.API.V1.GroupController.action/2\r\n        (app) web/controllers/api/v1/group_controller.ex:1: App.API.V1.GroupController.phoenix_controller_pipeline/2\r\n```\r\n\r\n### Expected behavior\r\n`inserted_at` and `updated_at` should work as previously did."},"comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments/217596798","html_url":"https://github.com/elixir-lang/ecto/issues/1412#issuecomment-217596798","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1412","id":217596798,"user":{"login":"lau","id":12623,"avatar_url":"https://avatars.githubusercontent.com/u/12623?v=3","gravatar_id":"","url":"https://api.github.com/users/lau","html_url":"https://github.com/lau","followers_url":"https://api.github.com/users/lau/followers","following_url":"https://api.github.com/users/lau/following{/other_user}","gists_url":"https://api.github.com/users/lau/gists{/gist_id}","starred_url":"https://api.github.com/users/lau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lau/subscriptions","organizations_url":"https://api.github.com/users/lau/orgs","repos_url":"https://api.github.com/users/lau/repos","events_url":"https://api.github.com/users/lau/events{/privacy}","received_events_url":"https://api.github.com/users/lau/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T01:28:41Z","updated_at":"2016-05-07T01:28:41Z","body":"@josevalim Thank you for making a solution so quickly. I have pushed a new version of Calecto with this change (https://github.com/lau/calecto/commit/f6bcd248f0f5bf7eb4dd2410524441372c0bed67). Tested it against 2.0.0-rc4 with you patch applied and it worked.\r\n\r\nWill your new code come out in a 2.0.0-rc5 version?"}}