Deborah, I'll second Todd W's response, and warn you to avoid solutions doing direct math on the result of time(), as they disregard the effects of Daylight Saving Time and calendar adjustments since the epoch.
Also, you can get the other midnight bookend for today, using Todd's method, though another timelocal() call: $todayEnd_epoch = timelocal( 0, 0, 24, $day, $month, $year ); Regs, Karl ----- Original Message ----- From: "Todd W" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 10, 2003 8:40 PM Subject: Re: Epoch midnight > > > Deborah Scott wrote: > > I thought I understood the answer, but I need more details. > > > > What exactly would I enter if I want a program to find the epoch time for > > midnight each night? I know how to find "current" time and date in both > > "human" time and epoch time. > > > > I want to generate a report that displays the events that are scheduled to > > occur each day. (from midnight to midnight) > > > > [trwww@devel_rh trwww]$ perl > use Time::Local; > ($day, $month, $year) = ( localtime() )[3 .. 5]; > > $epoch = timelocal( 0, 0, 0, $day, $month, $year ); > > print( scalar( localtime( $epoch ) ), "\n" ); > Ctrl-D > Fri Jan 10 00:00:00 2003 > > $epoch holds the seconds between the epoch and today at midight. > > Todd W. > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]