Date: 13 Mar 2002 11:41:38 +0100 From: Dag-Erling Smorgrav <des@ofug.org> To: Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: Nathan Mace <nmace85@yahoo.com>, freebsd-chat@freebsd.org Subject: Re: backups of log files Message-ID: <xzp1yeobvh9.fsf@flood.ping.uio.no> In-Reply-To: <20020313074829.GC375@hades.hell.gr> References: <200203130057.TAA27975@uce55.uchaswv.edu> <20020313074829.GC375@hades.hell.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
> use POSIX;
> $s = strftime("%d.%m.%Y", localtime());
> print "$s\n";
Umm, please, use %Y-%m-%d - it'll sort in the right order. And you
can just do:
print strftime("%Y-%m-%d\n", localtime());
or
my $logfn = strftime("log.%Y-%m-%d", localtime());
or whatever, no need for an intermediate variable.
DES
--
Dag-Erling Smorgrav - des@ofug.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp1yeobvh9.fsf>
