From: shawn bright Date: 2006-11-12T02:00:47+09:00 Subject: Re: best way to get epoch seconds from mysql datetime value ------=_Part_3989_25877625.1163264443892 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey great ! thanks, this works for me. sk On 11/11/06, ara.t.howard@noaa.gov wrote: > > On Sun, 12 Nov 2006, shawn bright wrote: > > > Hey there all, > > > > if i have a mysql datetime value that looks like this: > > some_time = '2006-05-11 05:14:14' > > > > and i want to get seconds since the unix epoch, how would i go about > that ? > > > > thanks > > require 'time' > > t = Time.parse some_time > epoch_seconds = t.to_i > > -a > -- > my religion is very simple. my religion is kindness. -- the dalai lama > > ------=_Part_3989_25877625.1163264443892--