#! /usr/sbin/perl
#
# prints the seconds since 1970 for the given time.
#
# Bill Dyess, 10/8/94
#
require "timelocal.pl";

die "Usage: $0 <Hours>:<Minutes>:<Seconds> <Month>/<Day>/<Year>\n" 
	unless $#ARGV == 1;
  
($hour,$min,$sec) = split(/:/,$ARGV[0]);
($month,$day,$year) = split(/\//,$ARGV[1]);

$time = &timelocal($sec, $min, $hour, $day, $month - 1, $year);
print "static time_t expire = $time;\n";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time);
$mon++;
print STDERR "Local: $hour:$min:$sec $mon/$mday/$year\n";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
$mon++;
print STDERR "GM:    $hour:$min:$sec $mon/$mday/$year\n";
