Re: unix date for perl time calculation

2007-03-21 Thread Chas Owens
On 3/21/07, Kevin Viel <[EMAIL PROTECTED]> wrote: I want to determine the amount of time one of my scripts and figured collecting the beginning and ending date might suffice, if I could feed it to, say, perl for the calculation: d0=`date` d1=`date` perl -e $d1 - $d0 > log Is this worth ex

Re: unix date for perl time calculation

2007-03-21 Thread yitzle
As Andy said, the built in time is what you want. However, take a look at http://perldoc.perl.org/functions/localtime.html You can do somehting like: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime (time

Re: unix date for perl time calculation

2007-03-21 Thread Andy Greenwood
On 3/21/07, Kevin Viel <[EMAIL PROTECTED]> wrote: I want to determine the amount of time one of my scripts and figured collecting the beginning and ending date might suffice, if I could feed it to, say, perl for the calculation: d0=`date` d1=`date` perl -e $d1 - $d0 > log Is this worth ex

unix date for perl time calculation

2007-03-21 Thread Kevin Viel
I want to determine the amount of time one of my scripts and figured collecting the beginning and ending date might suffice, if I could feed it to, say, perl for the calculation: d0=`date` d1=`date` perl -e $d1 - $d0 > log Is this worth exploring? Could someone direct me to a useful ref

Re: Date and time calculation

2004-06-17 Thread Chris Charley
> Hi there, > > I've got a date field and a time field, how can I effectively subtract the > field ($date $time) - ($date2 $time2) from each other. I am using these > two fields to determine a server's uptime according to my database in > days,hours,minutes,seconds. > Kind Regards, > Werner Otto P

RE: Date and time calculation

2004-06-16 Thread Tim Johnson
: Subject: Re: Date and time calculation Date::Calc Date::Manip DateTime All make this trivial.

Re: Date and time calculation

2004-06-16 Thread Wiggins d Anconia
> According to perldoc. > > Date_to_Time: > $time = Date_to_Time($year,$month,$day, $hour,$min,$sec); > > Here I can go print $time and get the value > > Time_to_Date: > ($year,$month,$day, $hour,$min,$sec) = Time_to_Date([time]); > > How do I see the value converted back to the dat

Re: Date and time calculation

2004-06-16 Thread Werner Otto
According to perldoc. Date_to_Time: $time = Date_to_Time($year,$month,$day, $hour,$min,$sec); Here I can go print $time and get the value Time_to_Date: ($year,$month,$day, $hour,$min,$sec) = Time_to_Date([time]); How do I see the value converted back to the date as it was? Hi there, I've got

Re: Date and time calculation

2004-06-16 Thread Wiggins d Anconia
> Hi there, > > I've got a date field and a time field, how can I effectively subtract the > field ($date $time) - ($date2 $time2) from each other. I am using these > two fields to determine a server's uptime according to my database in > days,hours,minutes,seconds. I have read numourous articl

Date and time calculation

2004-06-16 Thread Werner Otto
Hi there, I've got a date field and a time field, how can I effectively subtract the field ($date $time) - ($date2 $time2) from each other. I am using these two fields to determine a server's uptime according to my database in days,hours,minutes,seconds. I have read numourous articles and posts

time calculation [2]

2002-03-19 Thread Mariusz
;s rather the question for the logic solution I guess not the script itself. thanks, Mariusz - Original Message - From: "Mariusz" <[EMAIL PROTECTED]> To: "perl" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 12:56 AM Subject: time calculation What's

RE: time calculation

2002-03-19 Thread Hanson, Robert
your HTML documentation. perldoc -f localtime Rob -Original Message- From: Mariusz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 1:57 AM To: perl Subject: time calculation What's the best way to find the difference in hours between $checkin_time and $checkout_time? I th

RE: time calculation

2002-03-18 Thread Timothy Johnson
Where are you getting the hours from? A file, localtime(), etc.? -Original Message- From: Mariusz To: perl Sent: 3/18/02 10:56 PM Subject: time calculation What's the best way to find the difference in hours between $checkin_time and $checkout_time? I thought each hour from

time calculation

2002-03-18 Thread Mariusz
What's the best way to find the difference in hours between $checkin_time and $checkout_time? I thought each hour from 12am through 12pm would supply integer from 0 to 24 (e.g. 9am to 5pm is 17-9=8) but that does work except when checkout is 12am.(I don't have to deal with minutes in this scrip

Time Calculation

2001-10-24 Thread Martin Pfeffer
hi to all I hav a problem with GWT i use the following code: use DateTime::Precise; my $midnight = DateTime::Precise -> new(); my $day = $now -> day; my $month= $now -> month; my $year= $now -> year; $midnight -> set_from_datetime(qq($year.$month.$day 00:00:01)); $search_start = sp

Time - calculation

2001-10-24 Thread Martin Pfeffer
hi to all I hav a problem with GWT i use the following code: use DateTime::Precise; my $midnight = DateTime::Precise -> new(); my $day = $now -> day; my $month = $now -> month; my $year= $now -> year; $midnight -> set_from_datetime(qq($year.$month.$day 00:00:0