зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
be6bcba8c1
Коммит
d2ef9f4de3
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче