From 4bd1b240f551ba50bf5c027c85852e00f7e30b6a Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 7 Dec 1999 22:05:52 +0000 Subject: [PATCH] tweak fix for #15111 on last time. morse had the logic right the first time, we need to subtract the # of seconds between 1970 and 1900 from the mac cookies, not add. --- profile/pref-migrator/src/nsPrefMigration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profile/pref-migrator/src/nsPrefMigration.cpp b/profile/pref-migrator/src/nsPrefMigration.cpp index de39ac2bbc0..05c5a1cb89c 100644 --- a/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/profile/pref-migrator/src/nsPrefMigration.cpp @@ -165,7 +165,7 @@ typedef struct * 1970. In 5.0 it was made cross platform so that all platforms use * expiration times starting from 1970. That means that mac cookies * generated in 4.x cannot be migrated to 5.0 as is -- instead the - * expiration time must first be increased by + * expiration time must first be decreased by * the number of seconds between 1-1-1900 and 1-1-1970 * * 70 years * 365 days/year * 86,400 secs/day = 2,207,520,000 seconds @@ -1468,7 +1468,7 @@ Fix4xCookies(nsIFileSpec * profilePath) { * expires == 0. don't adjust those cookies. */ if (expires) { - expires += SECONDS_BETWEEN_1900_AND_1970; + expires -= SECONDS_BETWEEN_1900_AND_1970; } char dateString[36]; PR_snprintf(dateString, sizeof(dateString), "%lu", expires);