summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--tests/clock.test4
-rw-r--r--unix/tclUnixTime.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a426773..f2148a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-26 Reinhard Max <max@suse.de>
+
+ * unix/tclUnixTime.c: Make [clock format] respect locale settings.
+ * tests/clock.test: Bug #565880. ***POTENTIAL INCOMPATIBILITY***
+
2002-06-26 Miguel Sofer <msofer@users.sourceforge.net>
* doc/CrtInterp.3:
diff --git a/tests/clock.test b/tests/clock.test
index 1c7cf57..8f4014e 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -10,7 +10,9 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: clock.test,v 1.19 2002/05/29 09:08:43 hobbs Exp $
+# RCS: @(#) $Id: clock.test,v 1.20 2002/06/26 13:42:23 rmax Exp $
+
+set env(LC_TIME) POSIX
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 5107062..85ba721 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -9,11 +9,12 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTime.c,v 1.13 2002/05/29 00:19:39 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.14 2002/06/26 13:42:23 rmax Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
+#include <locale.h>
#define TM_YEAR_BASE 1900
#define IsLeapYear(x) ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))
@@ -332,6 +333,7 @@ TclpStrftime(s, maxsize, format, t, useGMT)
(((t->tm_hour * 60) + t->tm_min)/144));
return(strlen(s));
}
+ setlocale(LC_TIME, "");
return strftime(s, maxsize, format, t);
}