From: demizu@nff.ncl.omron.co.jp (DEMIZU Noritoshi)
Subject: Little getdate.pl
Organization: Advanced Systems Research Center, OMRON Corporation, Kyoto, Japan
	<DEMIZU.92Jul22152406@boo.nff.ncl.omron.co.jp>
Date: Wed, 22 Jul 1992 06:49:08 GMT

$B%*%`%m(J$B%s$N=P?e$G$9!#(J

fj.lang.perl $B$K$b%/%m%9%]%9%H$7$^$9!#(J

In article <DEMIZU.92Jul22152406@boo.nff.ncl.omron.co.jp>
	demizu@nff.ncl.omron.co.jp (DEMIZU Noritoshi) writes:

 | |                                      CNews $B$N(J getdate.y $B$K$b5-=R$,L5(J
 | |$B$$5-;v$N%?%$%`%>!<%s$N%G!<%?$O$I$&$d$l$PF~<j$G$-$k$G$7$g(J$B$&$+!)(J
 |
 |$B;d$bC5$7$F$$$^$9!#JL5-;v$G;d$,;}$C$F$$$k%G!<%?$rEj9F$7$^$9!#(J

$B%G!<%?$@$1=P$=$&$H;W$C$?$N$G(J$B$9$,!"(J perl $B$N%=!<%9$KKd$a9~$^$l$F$$$F$=$3(J
$B$@$1<h$j=P$9$N$,$a$s$I$&$@$C$?$N$G(J:-)$B!"(Jgetdate.pl $B$H$$$&%=(J$B!<%9$4$H=P$7(J
$B$^$9!#(J

$B%=!<%9$N:G8e$NJ}$K<!$N$h$&$K=q$$$F$"$j$^$9!#(J
    $sec_tz{'ACDT'}	=  10 * 3600 + 30 * 60;	# Australian Central Daylight
$B$3$l$O!"(J'ACDT' $B$H$$$&%?%$%`%>!<%s$O(J +1030 $B$H$$$&0UL#$G$9!#(J
'#' $B0J9_$O%3%a%s%H$G!"$I$3$N%?%$%`%>!<%s$+$,=q$$$F$"$j$^$9!#(J


$B$3$N%Q%C%1!<%8$O(J getdate.y $B$KHf$Y$k$H07$((J$B$k%U%)!<%^%C%H$OMZ$+$K>/$J$$(J
$B$G$9!#$7$+$7%?%$%`%>!<%s>pJs$O$A$g$C$H$@$1B?$$$G$9!#F|IU$rEO$9$H!"(J1970
$BG/(J$B#17n#1F|#0;~#0J,#0IC$+$i$NN_@QIC?t$,JV$5$l$^$9!#(J
	require "getdate.pl";
	$time = &getdate("Wed, 22 Jul 1992 06:24:06 GMT");
	$time = &getnewsdate("Wed, 22 Jul 1992 06:24:06 GMT");
getnewsdate $B$O!"CN$i$J(J$B$$%?%$%`%>!<%s$r%(%i!<$K$7$^$9!#%(%i!<$N$H$-$O(J
$time = -1 $B$G$9!#(J

$B$3$N(J getdate.pl $B$O%k!<%W$NCf$G#1K|2s(J$B!A#2K|2s8F$P$l$k$3$H$rA[Dj$7$F$$$k(J
$B$N$G!"%W%m%0%i%`$G#12s$3$C$-$j$7$+;H$o$J$$?M$+$i8+$k$H>iD9$J%3!<%I(J$B$,B?(J
$B$$$+$b$7$l$^$;$s!#(J

$B%P%0$J$I$rH/8+$7$?$i65$($F2<$5$$!#FC$K%?%$%`%>!<%s$K$D$$$F$N4V0c$$!&DI(J
$B2C>pJs(J$B$r$*4j$$$7$^$9!#(J


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  getdate.pl
# Wrapped by demizu@omrongw on Wed Jul 22 15:24:27 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'getdate.pl' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'getdate.pl'\"
else
echo shar: Extracting \"'getdate.pl'\" \(18970 characters\)
sed "s/^X//" >'getdate.pl' <<'END_OF_FILE'
X#
X# getdate.pl  --  date string evaluation package
X#
X#	Ver 0.9  coded by demizu@nff.ncl.omron.co.jp on Jul 5, 1992
X#
X#	You can use, copy, modify, distribute this software freely,
X#	but ABSOLUTELY NO WARANTY.
X#
X# NAME
X#	getdate, getnewsdate, convtime -- date string evaluation
X# SYNOPSIS
X#	$time = &main'getdate($date);
X#	$time = &main'getnewsdate($date);
X#	$time = &main'convtime($year,$mon,$day,$hour,$min,$sec,$tz);
X# DESCRIPTION
X#	getdate evaluates its argument as date representation and returns
X#	cumulative seconds since epoch time(Jan 1 1970 00:00:00).
X#	If the argument was wrong format, it returns -1.
X# SUPPORTED FORMAT (second field can be omitted)
X#	[Sun,] 17 May 1992 15:33:20 [GMT]
X#	[Sun] May 17 15:33:20 GMT 1992
X#	May 17  15:33:20
X#	May 17  1992
X#
X#
X# UNDOCUMENTED FEATURE FOR DEBUGING.
X#	&main'getdate_debug;		set debugging level
X#	&main'getdate_stat;		print getdate usage
X#
Xpackage getdate;
X
X# debug flag is off by default.
X$debug = 0;
X
X
X#########################################################################
X# SUBROUTINE getdate
X# $time = &main'getdate($date)
X#	IN:	$date:	formated date.  News or date command format.
X#	OUT:	$time:	cumulative seconds since epoch(Jan 1 1970 00:00:00)
X# All purpose date evaluation.
X#
Xsub main'getdate {
X    local($date) = @_;
X    local($_, $year,$mon,$day,$hour,$min,$sec,$tz);
X    $_ = $date;
X    y/a-z/A-Z/;
X    if (/^\s*(\w+,\s*|)(\d+)\s+(\w+)\s+(\d+)\s+([\d:]+)\s*(\S*)\s*$/o) {
X	#     [Sun,]    17      May    1992    15:33:20   [GMT]
X	# news date format
X	$year = $4; $mon = $mon_n{$3}; $day = $2; $tz = $6;
X	($hour, $min, $sec) = split(/:/, $5);
X    } elsif (/^\s*(\w+\s+|)(\w+)\s+(\d+)\s+([\d:]+)\s+(\S+)\s+(\d+)\s*$/o) {
X	#          [Sun]    May      17    15:33:20    GMT    1992
X	# date command format
X	$year = $6; $mon = $mon_n{$2}; $day = $3; $tz = $5;
X	($hour, $min, $sec) = split(/:/, $4);
X    } elsif (/^\s*(\w+)\s+(\d+)\s+(\d+)\s*$/o) {
X	#          May      17    1992
X	# ls date field format (long ago).  Assume time is 00:00:00.
X	$year = $3; $mon = $mon_n{$1}; $day = $2; $tz = "";
X    } elsif (/^\s*(\w+)\s+(\d+)\s+([\d:]+)\s*$/o) {
X	#          May      17    15:33:20
X	# ls date field format (recent)
X	$year = 0; $mon = $mon_n{$1}; $day = $2; $tz = "";
X	($hour, $min, $sec) = split(/:/, $3);
X    } else {
X	print STDERR "getdate: unknown date format\n" if ($debug);
X	return -1;
X    }
X    $hour = 0 if (!defined($hour));
X    $min  = 0 if (!defined($min));
X    $sec  = 0 if (!defined($sec));
X    &main'convtime($year,$mon,$day,$hour,$min,$sec,$tz);
X    # return with the result of convtime.
X}
X
X
X#########################################################################
X# SUBROUTINE getnewsdate
X# $time = &main'getnewsdate($date)
X#	IN:	$date:	formated date.  News or date command format.
X#	OUT:	$time:	cumulative seconds since epoch(Jan 1 1970 00:00:00)
X# All purpose date evaluation.
X#
Xsub main'getnewsdate {
X    local($date) = @_;
X    local($_, $year,$mon,$day,$hour,$min,$sec,$tz);
X    $_ = $date;
X    y/a-z/A-Z/;
X    if (/^\s*(\w+,\s*|)(\d+)\s+(\w+)\s+(\d+)\s+([\d:]+)\s+(\S+)\s*$/o) {
X	#     [Sun,]    17      May    1992    15:33:20    GMT
X	# news date format
X	$year = $4; $mon = $mon_n{$3}; $day = $2; $tz = $6;
X	($hour, $min, $sec) = split(/:/, $5);
X    } else {
X	print STDERR "getnewsdate: unknown date format\n" if ($debug);
X	return -1;
X    }
X    $hour = 0 if (!defined($hour));
X    $min  = 0 if (!defined($min));
X    $sec  = 0 if (!defined($sec));
X    &main'convtime($year,$mon,$day,$hour,$min,$sec,$tz);
X    # return with the result of convtime.
X}
X
X
X# SUBROUTINE convtime
X#	$time = &main'convtime($year,$mon,$day,$hour,$min,$sec,$tz);
X#	IN:	$year:	year		(1970 <= $year <= 2000)
X#		$mon:	month		(1 <= $mon  <= 12)
X#		$day:	day of month	(1 <= $day  <= 31)
X#		$hour:	hour		(0 <= $hour <= 60)
X#		$min:	minute		(0 <= $min  <= 60)
X#		$sec:	seconds		(0 <= $sec  <= 60)
X#		$tz:	time zone	GMT, JST, +0900, etc...
X#	OUT:	$time:	cumulative seconds since epoch(Jan 1 1970 00:00:00)
X#
Xsub main'convtime {
X    local($year,$mon,$day,$hour,$min,$sec,$tz) = @_;
X    local($cyear, $cmon);
X    local($total, $diff, $tzname);
X
X    # $year should satisfy ( 1700 < $year < 2050 ).
X    if (!defined($year) || $year == 0) {
X	# The date would be in this year or last year.
X	($cyear, $cmon) = (gmtime(time))[5,4];	# ad-hoc
X	$cmon++;
X	if ($cmon >= $mon) {
X	    $year = $cyear;
X	} else {
X	    $year = $cyear-1;
X	}
X    }
X    $year += 1900 if ($year < 100); # you should add 2000 some day...
X
X    # Check range of arguments
X    if ($debug) {
X	print STDERR "convtime: BAD DATE:"
X		   . " $year/$mon/$day $hour:$min:$sec $tz\n"
X	    unless ( (defined($year) && $year >= 1970 && $year < 2050)
X	      && (defined($mon)  && $mon  >= 1    && $mon  <= 12)
X	      && (defined($day)  && $day  >= 1    && $day  <= 31)
X	      && (defined($hour) && $hour >= 0    && $hour <= 60)
X	      && (defined($min)  && $min  >= 0    && $min  <= 60)
X	      && (defined($sec)  && $sec  >= 0    && $sec  <= 60) );
X    }
X
X    # Compute Cumulative seconds
X    $total = $sec_y{$year} + $sec_m[$mon] + ($day-1)*24*3600
X		+ $hour*3600 + $min*60 + $sec;
X    if ($leap_y{$year} && $mon > 2) {
X	$total += 24*3600;	# add leap day
X    }
X
X    # Look into TimeZone field
X    if ($tz =~ /^\s*([\w\d]*)([+-]{0,1})(\d{0,4})\s*/) {
X	#       GMT     +          0900
X	$tzname = $1;
X	$sign   = $2;
X	$mod    = $3;
X	$hour   = substr($mod,0,2);
X	$min    = substr($mod,2,2);
X    } else {
X	$tzname = "";
X	$sign   = "";
X	$mod    = "";
X	$hour   = "";
X	$min    = "";
X    }
X    if ($tzname) {
X	$diff = $sec_tz{$tzname};
X	if ($hour || !defined($diff)) {
X	    # I don't know of this format or time zone name.
X	    printf STDERR "unknown time zone \"$tz\"\n" if ($debug);
X	    $unknowntz{$tz}++ if ($debug);
X	    return -1;
X	}
X    } else {
X	if ($hour) {
X	    if (!$sign || $sign eq "+") {
X		$sign = 1;
X	    } else {
X		$sign = -1;
X	    }
X	    $hour = 0 if ($hour eq "");
X	    $min  = 0 if ($min  eq "");
X	    $diff = $sign * ($hour * 3600 + $min * 60);
X	} else {
X	    $notz++;
X	    # No Time Zone notation.  Use local time zone.
X	    # I don't know exact format and semantics of $TZ. X-<
X	    ($tzname, $sign, $mod) = ($ENV{'TZ'} =~ /^(\S+)([+-])(\d+)$/);
X	    $hour = substr($mod,0,2);
X	    $min  = substr($mod,2,2);
X	    if (!$sign || $sign eq "+") {
X		$sign = -1;
X	    } else {
X		$sign =  1;
X	    }
X	    $hour = 0 if ($hour eq "");
X	    $min  = 0 if ($min  eq "");
X	    $diff = $sign * ($hour * 3600 + $min * 60);
X	    $tzname = ""; # ad-hoc
X	}
X    }
X    $total -= $diff;
X
X    $usedtz{$tzname}++ if ($debug && $tzname);
X    $total;
X    # return with the value of $total
X}
X
X
X#########################################################################
X# FOR DEBUGGING
X#	&main'getdate_debug;
X#	&main'getdate_stat;
X
Xsub main'getdate_debug {
X    local($level) = @_;;
X    $level = 1 if (!defined($level));
X    $debug = $level;
X}
X
Xsub main'getdate_stat {
X    print "Used TimeZones:\n" if (%usedtz);
X    foreach $tz (sort keys %usedtz) {
X	print "  $tz($usedtz{$tz})\n";
X    }
X    print "Unknown TimeZones\n" if (%unknowntz);
X    foreach $tz (sort keys %unknowntz) {
X	print "  $tz($unknowntz{$tz})\n";
X    }
X    print "No TimeZone: $notz\n" if ($notz > 0);
X    print "\n";
X    @usedtz = ();
X    @unknowntz = ();
X    $notz = 0;
X}
X
X
X#########################################################################
X# Here we initialize following variables.
X#     @days_pm:	days per month
X#     @days_m:	total days at the beggining of the month
X#     @sec_m:	total seconds at the beggining of the month
X#     @leap_y:	leap year or not.
X#     @days_y:	total days at the beggining of the year
X#     @sec_y:	total seconds at the beggining of the year
X#     @month:	order of month to month name in English
X#     %mon_n:	month name to number of the month
X#     %sec_tz:	diff in seconds of the time zone
X
X    # days per month (pm: per month)
X    #              Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
X    @days_pm = ( 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
X
X    # Total days at the beggining of the month.
X    # But you have to consider of leap year.
X    $days_m[1] = 0;
X    $sec_m[1] = 0;
X    for ($m = 2 ; $m <= 12; $m++) {
X	$days_m[$m] = $days_m[$m-1] + $days_pm[$m-1];
X	$sec_m[$m]  = $days_m[$m] * 24 * 3600;
X    }
X
X    for ($y = 1970; $y <= 2050; $y++) {
X	$leap_y{$y} = !($y%4);	# 2000 is leap year.  2100 is very far. :)
X	$days_y{$y} = 365 * ($y - 1970) + int(($y - 1970 + 1)/4);
X	$sec_y{$y}  = $days_y{$y} * 24 * 3600;
X    }
X
X    # Month name to month order
X    $mon_n{'JAN'} = 1;	$mon_n{'JANUARY'} = 1;
X    $mon_n{'FEB'} = 2;	$mon_n{'FEBRUARY'} = 2;
X    $mon_n{'MAR'} = 3;	$mon_n{'MARCH'} = 3;
X    $mon_n{'APR'} = 4;	$mon_n{'APRIL'} = 4;
X    $mon_n{'MAY'} = 5;
X    $mon_n{'JUN'} = 6;	$mon_n{'JUNE'} = 6;
X    $mon_n{'JUL'} = 7;	$mon_n{'JULY'} = 7;
X    $mon_n{'AUG'} = 8;	$mon_n{'AUGUST'} = 8;
X    $mon_n{'SEP'} = 9;	$mon_n{'SEPTEMPER'} = 9;
X    $mon_n{'OCT'} = 10;	$mon_n{'OCTOBER'} = 10;
X    $mon_n{'NOV'} = 11;	$mon_n{'NOVEMBER'} = 11;
X    $mon_n{'DEC'} = 12;	$mon_n{'DECEMBER'} = 12;
X    # month order to month name
X    @month = ( "", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
X		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" );
X
X    # TIME ZONE information.  The unit is seconds.
X    # The value is the result of ( TimeOnTheTZ - TimeOnUTC ).
X    $sec_tz{''}		=   0;			# Default time zone is UTC
X    $sec_tz{'ACDT'}	=  10 * 3600 + 30 * 60;	# Australian Central Daylight
X    $sec_tz{'ACSST'}	=  10 * 3600 + 30 * 60;	# Australian Central Daylight
X    $sec_tz{'ACST'}	=   9 * 3600 + 30 * 60;	# Australian Central Standard
X#   $sec_tz{'ADT'}	=   0 * 3600;		# Azores DT
X    $sec_tz{'ADT'}	=  -3 * 3600;		# Atlantic Daylight
X#   $sec_tz{'ADT'}	=  -4 * 3600;		# Acre DT
X    $sec_tz{'AEDT'}	=  11 * 3600;		# Australian Eastern Daylight
X    $sec_tz{'AES'}	=  10 * 3600;		# Australian Eastern Standard
X    $sec_tz{'AESST'}	=  11 * 3600;		# E. Australia Summer Time??
X    $sec_tz{'AEST'}	=  10 * 3600;		# Australian Eastern Standard
X    $sec_tz{'AHDT'}	=  -9 * 3600;		# Alaska-Hawaii DT (1967to1983)
X    $sec_tz{'AHST'}	= -10 * 3600;		# Alaska-Hawaii ST (1967to1983)
X    $sec_tz{'AKDT'}	=  -8 * 3600;		# Alaska Daylight
X    $sec_tz{'AKST'}	=  -9 * 3600;		# Alaska Standard
X#   $sec_tz{'AST'}	=  -1 * 3600;		# Azores ST
X    $sec_tz{'AST'}	=  -4 * 3600;		# Atlantic ST (Canada)
X#   $sec_tz{'AST'}	=  -5 * 3600;		# Acre ST
X    $sec_tz{'AT'}	=  -2 * 3600;		# Azores (obsolete)
X    $sec_tz{'AWDT'}	=   9 * 3600;		# Australian Western Daylight
X    $sec_tz{'AWST'}	=   8 * 3600;		# Australian Western Standard
X    $sec_tz{'BRA'}	=  -3 * 3600;		# Brazil
X    $sec_tz{'BST'}	=   1 * 3600;		# British Summer Time
X#   $sec_tz{'BST'}	=  -3 * 3600;		# Brazil Standard
X#   $sec_tz{'BST'}	= -11 * 3600;		# Bering Summer (1967to1983)
X    $sec_tz{'BT'}	=   3 * 3600;		# Baghdad
X#   $sec_tz{'BT'}	= -11 * 3600;		# Bering (until1967)
X    $sec_tz{'CADT'}	=  10 * 3600 + 30 * 60;	# Central Australian Daylight
X    $sec_tz{'CAST'}	=   9 * 3600 + 30 * 60;	# Central Australian Standard
X    $sec_tz{'CAT'}	= -10 * 3600;		# Central Alaskan ST(until1967)
X    $sec_tz{'CCT'}	=   8 * 3600;		# China Coast (obsolete)
X#   $sec_tz{'CDT'}	=   9 * 3600;		# China Daylight
X#   $sec_tz{'CDT'}	=  -3 * 3600;		# Chile DT
X#   $sec_tz{'CDT'}	=  -4 * 3600;		# Cuba DT
X    $sec_tz{'CDT'}	=  -5 * 3600;		# Central Daylight (USA)
X    $sec_tz{'CEST'}	=   2 * 3600;		# Central Europe Summer Time
X    $sec_tz{'CET'}	=   1 * 3600;		# Central European Time
X    $sec_tz{'CETDST'}	=   2 * 3600;		# Central European Daylight
X#   $sec_tz{'CST'}	=   8 * 3600;		# China Standard
X#   $sec_tz{'CST'}	=   9 * 3600 + 30 * 60;	# North/South Australian Central Standard
X#   $sec_tz{'CST'}	=  -4 * 3600;		# Chile ST
X#   $sec_tz{'CST'}	=  -5 * 3600;		# Cuba ST
X    $sec_tz{'CST'}	=  -6 * 3600;		# Central Standard
X    $sec_tz{'DNT'}	=   1 * 3600;		# Dansk Normal Tid
X    $sec_tz{'EADT'}	=  11 * 3600;		# East Australian DT
X    $sec_tz{'EAST'}	=  10 * 3600;		# East Australian Standard
X#   $sec_tz{'EDT'}	=  -2 * 3600;		# East Brazil DT
X    $sec_tz{'EDT'}	=  -4 * 3600;		# Eastern Daylight (USA)
X#   $sec_tz{'EDT'}	=  -5 * 3600;		# Easter Island DT
X#   $sec_tz{'EDT'}	=  11 * 3600;		# Australian Eastern DT
X    $sec_tz{'EEST'}	=   3 * 3600;		# Eastern Europe Summer
X    $sec_tz{'EET'}	=   2 * 3600;		# Eastern Europe
X    $sec_tz{'EETDST'}	=   3 * 3600;		# Eastern European Daylight
X    $sec_tz{'EMT'}	=   1 * 3600;		# Norway
X#   $sec_tz{'EST'}	=  -3 * 3600;		# East Brazil ST
X    $sec_tz{'EST'}	=  -5 * 3600;		# Eastern Standard (USA)
X#   $sec_tz{'EST'}	=  -6 * 3600;		# Easter Island ST
X#   $sec_tz{'EST'}	=  10 * 3600;		# Australian Eastern Standard
X    $sec_tz{'FDT'}	=  -1 * 3600;		# Fernando de Noronha Daylight
X    $sec_tz{'FST'}	=   1 * 3600;		# French Summer Time
X#???$sec_tz{'FST'}	=   2 * 3600;		# French Summer
X#   $sec_tz{'FST'}	=  -2 * 3600;		# Fernando de Noronha Standard
X#???$sec_tz{'FWT'}	=   1 * 3600;		# French Winter
X    $sec_tz{'FWT'}	=   2 * 3600;		# French Winter Time
X    $sec_tz{'GMT'}	=   0 * 3600;		# Greenwich Mean Time
X#   $sec_tz{'GST'}	=  -3 * 3600;		# Greenland Standard (obsolete)
X    $sec_tz{'GST'}	=  10 * 3600;		# Guam Standard
X    $sec_tz{'HADT'}	=  -9 * 3600;		# Hawaiian-Aleutian Daylight
X    $sec_tz{'HAST'}	= -10 * 3600;		# Hawaiian-Aleutian Standard
X    $sec_tz{'HDT'}	=  -9 * 3600 - 30 * 60;	# Hawaiian Daylight (until 1947)
X    $sec_tz{'HFE'}	=   2 * 3600;		# Heure Francais d'Ete
X    $sec_tz{'HFH'}	=   1 * 3600;		# Heure Francais d'Hiver
X    $sec_tz{'HKT'}	=   8 * 3600;		# Hong Kong
X    $sec_tz{'HKT'}	=   8 * 3600;		# Hong Kong Time
X    $sec_tz{'HOE'}	=   1 * 3600;		# Spain
X    $sec_tz{'HST'}	= -10 * 3600;		# Hawaiian ST (-10:30until1947)
X    $sec_tz{'IDLE'}	=  12 * 3600;		# International Dateline, East
X    $sec_tz{'IDLW'}	= -12 * 3600;		# International Dateline, West
X    $sec_tz{'IDT'}	=   3 * 3600;		# Israeli Daylight
X#   $sec_tz{'IDT'}	=   4 * 3600 + 30 * 60;	# Iran Daylight
X    $sec_tz{'IST'}	=   2 * 3600;		# Israeli Standard
X#   $sec_tz{'IST'}	=   3 * 3600 + 30 * 60;	# Iran Standard
X#   $sec_tz{'IST'}	=   5 * 3600 + 30 * 60;	# Indian Standard
X    $sec_tz{'IT'}	=   3 * 3600 + 30 * 60;	# Iran
X    $sec_tz{'ITA'}	=   1 * 3600;		# Italy
X    $sec_tz{'JST'}	=   9 * 3600;		# Japanese Standard
X    $sec_tz{'JT'}	=   7 * 3600 + 30 * 60;	# Java
X    $sec_tz{'KDT'}	=  10 * 3600;		# Korean Daylight
X    $sec_tz{'KST'}	=   9 * 3600;		# Korean Standard
X    $sec_tz{'LIGT'}	=  10 * 3600;		# Melbourne, Australia
X    $sec_tz{'MAL'}	=   8 * 3600;		# Malaysia
X    $sec_tz{'MAT'}	=   3 * 3600;		# Turkey
X    $sec_tz{'MDT'}	=  -6 * 3600;		# Mountain Daylight (USA)
X    $sec_tz{'MEST'}	=   2 * 3600;		# Middle Europe Summer Time
X    $sec_tz{'MESZ'}	=   2 * 3600;		# Middle European Summer
X    $sec_tz{'MET'}	=   1 * 3600;		# Middle European
X    $sec_tz{'METDST'}	=   2 * 3600;		# Middle European Daylight
X    $sec_tz{'MEWT'}	=   1 * 3600;		# Middle European Winter
X    $sec_tz{'MEX'}	=  -6 * 3600;		# Mexico
X    $sec_tz{'MEZ'}	=   1 * 3600;		# Middle Europe Zone
X    $sec_tz{'MSD'}	=   3 * 3600;		# Moscow Summer
X    $sec_tz{'MSK'}	=   2 * 3600;		# Moscow Winter
X    $sec_tz{'MST'}	=  -7 * 3600;		# Mountain Standard (USA)
X    $sec_tz{'MT'}	=   8 * 3600 + 30 * 60;	# Moluccas (obsolete)
X    $sec_tz{'NDT'}	=  -2 * 3600 - 30 * 60;	# Newfoundland Daylight
X    $sec_tz{'NFT'}	=  -3 * 3600 - 30 * 60;	# Newfoundland ST
X    $sec_tz{'NOR'}	=   1 * 3600;		# Norway ST
X#   $sec_tz{'NST'}	=   8 * 3600 + 30 * 60;	# North Sumatran (obsolete)
X    $sec_tz{'NST'}	=  -3 * 3600 - 30 * 60;	# Newfoundland Standard
X    $sec_tz{'NT'}	= -11 * 3600;		# Nome (until 1967)
X    $sec_tz{'NZDT'}	=  13 * 3600;		# New Zealand Daylight
X    $sec_tz{'NZST'}	=  12 * 3600;		# New Zealand Standard
X    $sec_tz{'NZT'}	=  12 * 3600;		# New Zealand Time
X    $sec_tz{'PDT'}	=  -7 * 3600;		# Pacific Daylight
X    $sec_tz{'PST'}	=  -8 * 3600;		# Pacific Standard
X    $sec_tz{'SADT'}	=  10 * 3600 + 30 * 60;	# South Australian Daylight
X    $sec_tz{'SAST'}	=   9 * 3600 + 30 * 60;	# South Australian Standard
X    $sec_tz{'SET'}	=   1 * 3600;		# European -- Prague, Vienna
X    $sec_tz{'SST'}	=   2 * 3600;		# Swedish Summer Time
X#   $sec_tz{'SST'}	=   7 * 3600;		# South Sumatran (obsolete)
X#   $sec_tz{'SST'}	=   8 * 3600;		# Singapore Standard
X#   $sec_tz{'SST'}	= -11 * 3600;		# Samoa Standard
X    $sec_tz{'SWT'}	=   1 * 3600;		# Swedish Winter Time
X    $sec_tz{'THA'}	=   7 * 3600;		# Thailand Standard
X    $sec_tz{'TST'}	=   3 * 3600;		# Turkish Standard
X    $sec_tz{'UT'}	=   0 * 3600;		# Universal
X    $sec_tz{'UTC'}	=   0 * 3600;		# Universal Time Coordinated
X    $sec_tz{'UTZ'}	=  -3 * 3600;		# Western Greenland Standard
X    $sec_tz{'VTZ'}	=  -2 * 3600;		# Eastern Greenland Standard
X#???$sec_tz{'VTZ'}	=  -2 * 3600;		# Western Greenland Daylight
X    $sec_tz{'WADT'}	=   8 * 3600;		# Western Australian Daylight
X    $sec_tz{'WAST'}	=   7 * 3600;		# Western Australian Standard
X#???$sec_tz{'WAST'}	=   8 * 3600;		# West Australian ST
X#   $sec_tz{'WAT'}	=   1 * 3600;		# West African (obsolete)
X#???$sec_tz{'WAT'}	=  -1 * 3600;		# West Africa Time
X    $sec_tz{'WDT'}	=   9 * 3600;		# Western Australian Daylight
X#   $sec_tz{'WDT'}	=  -3 * 3600;		# Western Brazil DT
X    $sec_tz{'WEST'}	=   1 * 3600;		# Western Europe Summer
X    $sec_tz{'WET'}	=   0 * 3600;		# Western European
X    $sec_tz{'WET'}	=   1 * 3600;		# Western European Time
X    $sec_tz{'WETDST'}	=   1 * 3600;		# Western European Daylight
X    $sec_tz{'WST'}	=   8 * 3600;		# Australian Western Standard
X#   $sec_tz{'WST'}	=  -4 * 3600;		# Western Brazil ST
X    $sec_tz{'WTZ'}	=  -1 * 3600;		# Eastern Greenland Daylight
X    $sec_tz{'WUT'}	=   1 * 3600;		# Austria
X    $sec_tz{'YDT'}	=  -8 * 3600;		# Yukon Daylight
X    $sec_tz{'YST'}	=  -9 * 3600;		# Yukon Standard
X    $sec_tz{'ZP4'}	=  -4 * 3600;		# GMT +4  hours.
X    $sec_tz{'ZP5'}	=  -5 * 3600;		# GMT +5  hours.
X    $sec_tz{'ZP6'}	=  -6 * 3600;		# GMT +6  hours.
X    # military notation
X    $sec_tz{'A'}	= - 1 * 3600;		# UTC+1h
X    $sec_tz{'B'}	= - 2 * 3600;		# UTC+2h
X    $sec_tz{'C'}	= - 3 * 3600;		# UTC+3h
X    $sec_tz{'D'}	= - 4 * 3600;		# UTC+4h
X    $sec_tz{'E'}	= - 5 * 3600;		# UTC+5h
X    $sec_tz{'F'}	= - 6 * 3600;		# UTC+6h
X    $sec_tz{'G'}	= - 7 * 3600;		# UTC+7h
X    $sec_tz{'H'}	= - 8 * 3600;		# UTC+8h
X    $sec_tz{'I'}	= - 9 * 3600;		# UTC+9h
X    $sec_tz{'K'}	= -10 * 3600;		# UTC+10h
X    $sec_tz{'L'}	= -11 * 3600;		# UTC+11h
X    $sec_tz{'M'}	= -12 * 3600;		# UTC+12h
X    $sec_tz{'N'}	=   1 * 3600;		# UTC-1h
X    $sec_tz{'O'}	=   2 * 3600;		# UTC-2h
X    $sec_tz{'P'}	=   3 * 3600;		# UTC-3h
X    $sec_tz{'Q'}	=   4 * 3600;		# UTC-4h
X    $sec_tz{'R'}	=   5 * 3600;		# UTC-5h
X    $sec_tz{'S'}	=   6 * 3600;		# UTC-6h
X    $sec_tz{'T'}	=   7 * 3600;		# UTC-7h
X    $sec_tz{'U'}	=   8 * 3600;		# UTC-8h
X    $sec_tz{'V'}	=   9 * 3600;		# UTC-9h
X    $sec_tz{'W'}	=  10 * 3600;		# UTC-10h
X    $sec_tz{'X'}	=  11 * 3600;		# UTC-11h
X    $sec_tz{'Y'}	=  12 * 3600;		# UTC-12h
X    $sec_tz{'Z'}	=   0 * 3600;		# UTC
X
X1; # END of package getdate
X#########################################################################
END_OF_FILE
if test 18970 -ne `wc -c <'getdate.pl'`; then
    echo shar: \"'getdate.pl'\" unpacked with wrong size!
fi
# end of 'getdate.pl'
fi
echo shar: End of shell archive.
exit 0
--
;  DEMIZU, Noritoshi		OMRON Computer Systems R&D laboratory
;  demizu@nff.ncl.omron.co.jp	tel: +81-75-951-5111  fax: +81-75-956-7403
Newsgroups: fj.lang.fortran