From: sof Date: Thu, 30 Sep 1999 16:20:14 +0000 (+0000) Subject: [project @ 1999-09-30 16:20:14 by sof] X-Git-Tag: Approximately_9120_patches~5738 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=16e8017ce365bc62cf09e702c78983a331ce92b2;p=ghc-hetmet.git [project @ 1999-09-30 16:20:14 by sof] For strftime()'s format string, stay within the bounds of ISO/ANSI C --- diff --git a/ghc/lib/std/cbits/showTime.c b/ghc/lib/std/cbits/showTime.c index 5640bd5..8026a03 100644 --- a/ghc/lib/std/cbits/showTime.c +++ b/ghc/lib/std/cbits/showTime.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: showTime.c,v 1.5 1999/09/30 14:25:47 sof Exp $ + * $Id: showTime.c,v 1.6 1999/09/30 16:20:14 sof Exp $ * * ClockTime.showsPrec Runtime Support */ @@ -41,7 +41,7 @@ showTime(I_ size, StgByteArray d, I_ maxsize, StgByteArray buf) return (-1); } tm = localtime(&t); - if (tm != NULL && strftime(buf, maxsize, "%a %b %d %T %Z %Y", tm) > 0) { + if (tm != NULL && strftime(buf, maxsize, "%a %b %d %H:%M:%S %z %Y", tm) > 0) { return 1; } else { return (-1);