> $ perl -le'use Time::Local; > my $time = timelocal(0,0,0,5,11,101); > print scalar localtime($time); > print scalar localtime($time + 36_000); > ' > Wed Dec 5 00:00:00 2001 > Wed Dec 5 10:00:00 2001 > >
Thanks a lot. -tir On Wed, 5 Dec 2001, John W. Krahn wrote: > "Tirthankar C. Patnaik" wrote: > > > > I have a set of timestamps, which are seconds since midnight. > > > > say, 36000 > > 36001 > > 36002 > > ..... > > > > I'd like to convert them into the format: > > > > 10:00:00 > > 10:00:01 > > ..... > > > > Can I do this using Date::Manip, failing, which, is there any other way in > > perl? > > > $ perl -le'use Time::Local; > my $time = timelocal(0,0,0,5,11,101); > print scalar localtime($time); > print scalar localtime($time + 36_000); > ' > Wed Dec 5 00:00:00 2001 > Wed Dec 5 10:00:00 2001 > > > > John > -- > use Perl; > program > fulfillment > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Tirthankar, IGIDR. +91-22-8400919 x275 (r), x593(o), x(542), +91-22-8421206 (r) http://www.igidr.ac.in/~tir Yet turn thee to the doubtful shore, Where thy first form was made a man; I loved thee, Spirit, and love, nor can The soul of Shakspeare love thee more. -Tennyson, Lord Alfred. (In Memoriam A.H.H.) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]