From: David Douthitt Date: 2002-07-23T06:52:23+09:00 Subject: Time Conversion This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. ----=_NextPart_ST_16_52_20_Monday_July_22_2002_1890 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable How do I convert an integer to a time and date? Specifically, given: t =3D File.mtime(x).to_i I want to be able to: printf("%s\n", t.to_time) How do you define the method to_time? Doesn't seem to be any built-ins, ev= en though I find that odd. Nothing in class Integer, Float, or Fixnum - an= d nothing in ParseDate about "seconds since epoch" or integers and such. David Douthitt CUNA & Affiliates UNIX Systems Administrator ddouthitt@cuna.coop (608) 231-4922 ----=_NextPart_ST_16_52_20_Monday_July_22_2002_1890 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
How do I convert an integer to a time and date?  Specifically, given:
 
t =3D File.mtime(x).to_i
 
I want to be able to:
 
printf("%s\n", t.to_time)
 
How do you define the method to_time?  Doesn't see= m to be=20 any built-ins, even though I find that odd.  Nothing in class Integer,= =20 Float, or Fixnum - and nothing in ParseDate about "seconds since epoch" or integers and such.
 
 
 
David Douthitt
CUNA & Affiliates
UNIX Systems= =20 Administrator
ddouthitt@cuna.coop
(608)=20 231-4922
----=_NextPart_ST_16_52_20_Monday_July_22_2002_1890--