From: tneff@bfmny0.UU.NET (Tom Neff)
Newsgroups: alt.sources
Subject: Re: gmtdate(1)
Message-ID: <15298@bfmny0.UU.NET>
Date: 28 Mar 90 01:40:06 GMT

There were a couple of loopholes in my recent one-liner gmtdate(1)
posting.  My thanks to reader Geoff Clare <gwc@root.co.uk> for his
careful attention to things my addled brain didn't notice.

This version (a) exports the TZ correctly for weird Bourne shells, (b)
survives British Summer Time right, and (c) handles date(1) formats with
embedded blanks - quite important.

--- cut here --- cut here --- cut here --- cut here --- cut here ---
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	gmtdate
# This archive created: Wed Mar 28 16:33:20 1990
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'gmtdate'
then
	echo shar: "will not over-write existing file 'gmtdate'"
else
sed 's/^X//' << \SHAR_EOF > 'gmtdate'
XTZ=GMT0 export TZ ; exec /bin/date ${1+"$@"}
SHAR_EOF
chmod +x 'gmtdate'
fi
exit 0
#	End of shell archive
