in reply to 'Difference between two dates in a ss:mm:hh etc format?'

You might try this ...
$ cat datediff.pl #!/usr/bin/perl -w use strict; use Time::JulianDay; use vars qw/ $opt_a $opt_b /; use Getopt::Std; my $dateA = "59:59:23:31:11:2002"; # 1 second before 2003 my $dateB = "00:00:00:01:00:2003"; # 2003 getopt( "a:b:"); if( $opt_a ) { $dateA = $opt_a; } if( $opt_b ) { $dateB = $opt_b; } print "dateA = $dateA\n"; print "dateB = $dateB\n"; my ($sec,$min,$hours,$mday,$month_0_to_11,$year) = split /:/, $dateA; print "($sec,$min,$hours,$mday,$month_0_to_11,$year)\n"; ### ssA is the seconds since JAN 1st 1970 for dateA my $ssA = jd_timelocal($sec,$min,$hours,$mday,$month_0_to_11,$year); print "seconds from Jan 1st 1970 to 1 second before 2003 = $ssA\n"; ($sec,$min,$hours,$mday,$month_0_to_11,$year) = split /:/, $dateB; print "($sec,$min,$hours,$mday,$month_0_to_11,$year)\n"; ### ssB is the seconds since JAN 1st 1970 for dateB my $ssB = jd_timelocal($sec,$min,$hours,$mday,$month_0_to_11,$year); print "number of seconds from Jan 1st 1970 to midnight 2003 = $ssB\n"; my $diff = $ssB - $ssA; print "The diffence in seconds between $dateB and $dateA = $diff\n";
Here's soe output ...
$ ./datediff.pl dateA = 59:59:23:31:11:2002 dateB = 00:00:00:01:00:2003 (59,59,23,31,11,2002) number of seconds from Jan 1st 1970 to 1 second before 2003 = 10414079 +99 (00,00,00,01,00,2003) number of seconds from Jan 1st 1970 to midnight 2003 = 1041408000 The diffence in seconds between 00:00:00:01:00:2003 and 59:59:23:31:11 +:2002 = 1

the module Time::JulianDay is very to install.