home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 1996 World Exposition
/
park.org.s3.amazonaws.com.7z
/
park.org.s3.amazonaws.com
/
cgi-bin
/
Japan
/
Theme
/
bearth
/
bin
/
getgmtday
< prev
next >
Wrap
Text File
|
2017-09-21
|
350b
|
15 lines
#!/usr/local/bin/perl
#
# getgmtday
# - get yesterday's date on GMT
# - result is printed to stdout
# usage: getgmtday
# created by haruki@st.rim.or.jp 1996/11/24
$secofday=(60 * 60 * 24);
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
=gmtime(time - ($secofday));
$year += 1900;
printf ("%04d%02d%02d\n", $year, $mon+1, $mday);