From: Jonathan Nielsen Date: 2011-01-20T17:03:27+09:00 Subject: Re: How to reference a different epoch. On Wed, Jan 19, 2011 at 10:51 PM, Phil Henley wrote: > I'm trying to use the 'at' method in Time on some data pulled from an > OSX file: > > Time.at(317192535.56501901) > > And my result is off by 30 years.  I assume this is because Ruby is > referencing the Unix epoch of 1/1/1970 and I need to reference the OSX > epoch of 1/1/2000.  Is there aSn easy way to change this so I'm > referencing the OSX epoch? > Sure, you should be able to add 978307200 to the result of your Time.at call. I believe that's the right number anyway, it's the result of Time.mktime("2001 Jan 01") - Time.mktime("1970 Jan 01"). -Jonathan Nielsen