Forum: Ruby Problem converting a System Time to DateTime

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
78ee9d5c27eebd474b9552c6203571c0?d=identicon&s=25 Marc Howell (Guest)
on 2008-12-18 13:59
(Received via mailing list)
Hi All

I am new to Ruby and working on a project which needs to read a
SystemTime (milliseconds from 1 Jan 1970) from an xml file and convert
it to a DateTime.

Unfortunately I cant seem to find any method for doing so in either
the Date or Time classes. Does such a function exist? If not, is there
any other way to do this?

Thanks for you help
Marc
78ee9d5c27eebd474b9552c6203571c0?d=identicon&s=25 Marc (Guest)
on 2008-12-18 14:10
(Received via mailing list)
On Dec 18, 2:50 pm, "Marc Howell" <darklin...@gmail.com> wrote:
> Thanks for you help
> Marc

Of course once I have clicked send, I find the solution imediately.

Time.at wasnt working because one of my Unix Times was corrupt, of
course it was the very first one so I never realised the rest of them
were working since it bombed out with a Bignum error on the very first
conversion.

Thanks anyway
Marc
This topic is locked and can not be replied to.