How to set a datetime to localtime?

I would like to set the localtime, before validation. but if I write

before_validation :start_timing

def start_timing
s = self.starting_at #params is 20008-10-31, no time
self.starting_at = Time.local(s.to_date.year, s.to_date.month,
s.to_date.day, 0, 0, 1)
end

it doesn’t result in the correct localtime, giving 2008-10-31 23:00:01
in the database which is 2 hours less
(config.time_zone = “Paris”)
I would like 00:00:01 being set as the localtime…

how should I proceed ?

many thanks fyh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs