Commit in reactos/lib on MAIN
crtdll/time/ctime.c+8-81.11 -> 1.12
msvcrt/time/ctime.c+8-61.12 -> 1.13
+16-14
2 modified files
the time zone buffers need to be large enough, applications like firefox might attempt to write into it

reactos/lib/crtdll/time
ctime.c 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- ctime.c	15 Aug 2004 17:34:28 -0000	1.11
+++ ctime.c	2 Dec 2004 21:19:55 -0000	1.12
@@ -78,7 +78,7 @@
 **	5.	They might reference tm.TM_ZONE after calling offtime.
 ** What's best to do in the above cases is open to debate;
 ** for now, we just set things up so that in any of the five cases
-** WILDABBR is used.  Another possibility:  initialize tzname[0] to the
+** 4ABBR is used.  Another possibility:  initialize tzname[0] to the
 ** string "tzname[0] used before set", and similarly for the other cases.
 ** And another:  initialize tzname[0] to "ERA", with an explanation in the
 ** manual page of what this "time zone abbreviation" means (doing this so
@@ -88,8 +88,8 @@
 void _set_daylight_export(int);
 void _set_timezone_export(int);
 
-
-static char WILDABBR[] = "   ";
+static char TZ_NAME[16] = "JST";
+static char TZ_DST_NAME[12] = "";
 
 #ifndef TRUE
 #define TRUE		1
@@ -183,8 +183,8 @@
 static int gmt_is_set;
 
 char * _tzname[2] = {
-  WILDABBR,
-  WILDABBR
+  TZ_NAME,
+  TZ_DST_NAME
 };
 
 static long
@@ -205,8 +205,8 @@
   const struct state * CPP_CONST sp = lclptr;
   int i;
 
-  _tzname[0] = WILDABBR;
-  _tzname[1] = WILDABBR;
+  _tzname[0] = TZ_NAME;
+  _tzname[1] = TZ_DST_NAME;
 #ifdef ALL_STATE
   if (sp == NULL)
   {
@@ -1060,7 +1060,7 @@
    ** but this is no time for a treasure hunt.
    */
   if (offset != 0)
-    tmp->tm_zone = WILDABBR;
+    tmp->tm_zone = TZ_NAME;
   else
   {
 #ifdef ALL_STATE

reactos/lib/msvcrt/time
ctime.c 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- ctime.c	15 Aug 2004 18:16:38 -0000	1.12
+++ ctime.c	2 Dec 2004 21:19:56 -0000	1.13
@@ -89,7 +89,9 @@
 void _set_timezone_export(int);
 
 
-static char WILDABBR[] = "   ";
+/* buffers must hold 64 characters! */
+static char TZ_NAME[64] = "PST";
+static char TZ_DST_NAME[64] = "PDT";
 
 #ifndef TRUE
 #define TRUE        1
@@ -183,8 +185,8 @@
 static int gmt_is_set;
 
 char * _tzname[2] = {
-  WILDABBR,
-  WILDABBR
+  TZ_NAME,
+  TZ_DST_NAME,
 };
 
 static long
@@ -205,8 +207,8 @@
   const struct state * CPP_CONST sp = lclptr;
   int i;
 
-  _tzname[0] = WILDABBR;
-  _tzname[1] = WILDABBR;
+  _tzname[0] = TZ_NAME;
+  _tzname[1] = TZ_DST_NAME;
 #ifdef ALL_STATE
   if (sp == NULL)
   {
@@ -1058,7 +1060,7 @@
    ** but this is no time for a treasure hunt.
    */
   if (offset != 0)
-    tmp->tm_zone = WILDABBR;
+    tmp->tm_zone = TZ_NAME;
   else
   {
 #ifdef ALL_STATE
CVSspam 0.2.8