mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
b8fa07f3ff
commit
74f7b8e000
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user