On Dec 3, 2008, at 8:34 , Henry Hartley wrote: > [EMAIL PROTECTED] wrote: > >>> (by default, 'time()' is the param for localtime() ). So you can >>> get the values for yest by subtracting 1 day worth of seconds: >>> my ($mday, $mon, $year) = (localtime(time() - 60 * 60 * 24) ) >>> [ 3,4,5]; >>> printf("%d/%02d/%02d\n", $year + 1900, $mon + 1, $mday - 1); > > Will there be a time when that's wrong due to daylight saving time > changes?
Yes. There are 2 hours each year when this formula is wrong. --Gisle _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs