Re: Time since midnight

2001-12-05 Thread Flavio Soibelmann Glock
> Can I do this using Date::Manip Yes, I guess :) >is there any other way use Date::Tie; tie %time, 'Date::Tie'; $time{epoch} = 36000; print "$time{hour}:$time{minute}:$time{second}\n"; $time{epoch}++; print "$time{hour}:$time{minute}:$time{second}\n"; $time{epoch}++; print "$time{hour}:$time

Re: Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
> No need for Date::Manip or anything: > > > $timestamp = 36059; > $time = sprintf '%02d:%02d:%02d', > $timestamp / 3600, ($timestamp/60) % 60, $timestamp % 60; Jeez, that is exactly how it should be! I overlooked the obvious in search of the exotic. Thanks, -tir On Wed, 5 Dec 2001

Re: Time since midnight.

2001-12-05 Thread Jenda Krynicky
From: "Tirthankar C. Patnaik" <[EMAIL PROTECTED]> > 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 us

Re: Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
> $ 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. Patnai

Re: Time since midnight.

2001-12-05 Thread John W. Krahn
"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

Re: Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
Could you give a specific code? Also, apropos to my earlier mail, can this be done using Date::Manip? -tir On Wed, 5 Dec 2001, [EMAIL PROTECTED] wrote: > On Wed, 5 Dec 2001, Tirthankar C. Patnaik wrote: > > > Date: Wed, 5 Dec 2001 14:18:35 +0530 (IST) > > From: Tirthankar C. Patnaik <[EM

Re: Time since midnight.

2001-12-05 Thread [EMAIL PROTECTED]
On Wed, 5 Dec 2001, Tirthankar C. Patnaik wrote: > Date: Wed, 5 Dec 2001 14:18:35 +0530 (IST) > From: Tirthankar C. Patnaik <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Time since midnight. > > > > I have a set of timestamps, which are seconds since midnight. > > say, 36000 > 36001