Hi, when I’m trying to rake db:load:fixtures, I get
Mysql::Error: Incorrect datetime value: ‘2010-02-02 16:20:25 UTC’ for column ‘last_online_time’ at row 1:
INSERT INTO `devices` (`name`, `updated_at`, `icon_id`, `provision_status_id`, `account_id`, `last_online_time`, `group_id`, `id`, `recent_reading_id`, `imei`, `profile_id`, `created_at`)
VALUES (‘device 3’, ‘2010-02-02 18:20:25’, 3, 1, 1, ‘2010-02-02 16:20:25 UTC’, 2, 3, 3, 54321, 1, ‘2010-02-02 18:20:25 UTC’)
I’m using mysql. If I strip off the ‘UTC’ part and paste the sql it works fine. Any hints how to either make mysql recognize ‘UTC’?
This is the fixture:
device3:
id: 3
name: device 3
imei: 54321
created_at: <%= Time.zone.now.to_s %>
recent_reading_id: 3
provision_status_id: 1
account_id: 1 # Nick Co
group_id: 2
last_online_time: <%= (Time.zone.now-120*60).to_s %>
icon_id: 3
profile_id: 1
Thanks
Jan
