Just found this solution: plain db update before db:push.

update activity set
created_at = (select created_at::timestamp with time zone at time zone
'utc'),
updated_at = (select updated_at::timestamp with time zone at time zone
'utc')
;

Anything better?

On Jun 10, 10:40 am, edoardoz <[email protected]> wrote:
> In my server I have a db created without TimeZone management. This
> mean all DateTime fields are saved as LocalTime.
>
> To manage Heroku's different TZ I added config.time_zone = 'my TZ' to
> config/environment.rb, this mean DateTime fields are saved as UTC and
> returned with .in_time_zone.
>
> heroku db:push don't care about TZ and so I get old LocalTime fields
> as UTC fields with no conversion.
>
> Anyone managed this issue before?

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to