Converting unix_t time to something rails understands

I have some data that I want to import into a table. The import file
has
dates in unix_t time format ( seconds since 1970). How would I convert
that
to either a datetime value or a string? Is that a magic function
somewhere?


Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson

On Thu, Mar 27, 2008 at 05:19:24AM -0700, Larry K. wrote:

I have some data that I want to import into a table. The import file has
dates in unix_t time format ( seconds since 1970). How would I convert that
to either a datetime value or a string? Is that a magic function somewhere?

Time.at seconds_since_epoch

Best Regards,
-Larry
–Greg

Perfect!
Thanks Greg,
-Larry

On Thu, Mar 27, 2008 at 6:19 AM, Gregory S. <
[email protected]> wrote:

Best Regards,
-Larry
–Greg


Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson

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