diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp
index 53e362fbf7d..6dfd0f6a915 100644
--- a/mozilla/content/html/document/src/nsHTMLDocument.cpp
+++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp
@@ -507,19 +507,8 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
if (NS_FAILED(rv)) { return rv; }
PRExplodedTime prtime;
char buf[100];
- PRInt64 prusec, scale;
-
-#ifdef XP_PC
- LL_I2L(scale, 1L);
-#else
- // nsIFile->GetLastModificationDate() uses stat on Unix and not
- // PRFileInfo64() to get the modification date, untill that is changed
- // we haveto do different scaling to get the date right.
- LL_I2L(scale, 1000000L);
-#endif
- LL_MUL(prusec, modDate, scale);
- PR_ExplodeTime(prusec, PR_LocalTimeParameters, &prtime);
+ PR_ExplodeTime(modDate, PR_LocalTimeParameters, &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
diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp
index 53e362fbf7d..6dfd0f6a915 100644
--- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp
+++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp
@@ -507,19 +507,8 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
if (NS_FAILED(rv)) { return rv; }
PRExplodedTime prtime;
char buf[100];
- PRInt64 prusec, scale;
-
-#ifdef XP_PC
- LL_I2L(scale, 1L);
-#else
- // nsIFile->GetLastModificationDate() uses stat on Unix and not
- // PRFileInfo64() to get the modification date, untill that is changed
- // we haveto do different scaling to get the date right.
- LL_I2L(scale, 1000000L);
-#endif
- LL_MUL(prusec, modDate, scale);
- PR_ExplodeTime(prusec, PR_LocalTimeParameters, &prtime);
+ PR_ExplodeTime(modDate, PR_LocalTimeParameters, &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
diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp
index d80d381d302..cb5c1a66b26 100644
--- a/mozilla/xpcom/io/nsLocalFileUnix.cpp
+++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp
@@ -776,8 +776,13 @@ NS_IMETHODIMP
nsLocalFile::GetLastModificationDate(PRInt64 *aLastModificationDate)
{
NS_ENSURE_ARG(aLastModificationDate);
- VALIDATE_STAT_CACHE();
- mLL_II2L(0, (PRUint32)mCachedStat.st_mtime, *aLastModificationDate);
+ CHECK_mPath();
+ PRFileInfo64 info;
+ if (PR_GetFileInfo64(mPath, &info) != PR_SUCCESS) {
+ return NSRESULT_FOR_ERRNO();
+ }
+ // PRTime is a 64 bit value
+ *aLastModificationDate = info.modifyTime;
return NS_OK;
}