Fix to 21900.

#ifdef strftime formatting string "%#c" ('format to 4-digit date string, any format') to "%c" for non-Windows platform, as only Windows accepts, requires or understands that extra '#' to get a 4-digit date.

Thanks to KerryGinn@computer.org for spotting this one.  (document.lastModified came out as "%#c" on a mac.)

r=Pavlov
a=choffman.
This commit is contained in:
mccabe%netscape.com 1999-12-16 09:06:41 +00:00
parent b8fa07f3ff
commit 74f7b8e000
2 changed files with 22 additions and 2 deletions

View File

@ -505,7 +505,17 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
LL_I2L(scale, 1000000L);
LL_MUL(prusec, modDate, scale);
PR_ExplodeTime(prusec, PR_LocalTimeParameters, &prtime);
PR_FormatTime(buf, sizeof buf, "%#c", &prtime);
// Use '%#c' for windows, because '%c' is backward-compatible and
// non-y2k with msvc; '%#c' requests that a full year be used in the
// result string. Other OSes just use "%c".
PR_FormatTime(buf, sizeof buf,
#ifdef _WIN32
"%#c",
#else
"%c",
#endif
&prtime);
lastModified.SetString(buf);
SetLastModified(lastModified);
}

View File

@ -505,7 +505,17 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
LL_I2L(scale, 1000000L);
LL_MUL(prusec, modDate, scale);
PR_ExplodeTime(prusec, PR_LocalTimeParameters, &prtime);
PR_FormatTime(buf, sizeof buf, "%#c", &prtime);
// Use '%#c' for windows, because '%c' is backward-compatible and
// non-y2k with msvc; '%#c' requests that a full year be used in the
// result string. Other OSes just use "%c".
PR_FormatTime(buf, sizeof buf,
#ifdef _WIN32
"%#c",
#else
"%c",
#endif
&prtime);
lastModified.SetString(buf);
SetLastModified(lastModified);
}