diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 02:53:36 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 02:53:36 +0000 |
commit | a4a3292e978cca3ad8c0baa5205054b5b3802e64 (patch) | |
tree | 9490d74f9760c4b841f1188e13b1a91db374c327 /base/time.h | |
parent | 67d0d62d638f7b15e031dd2c22756df0109e021d (diff) | |
download | chromium_src-a4a3292e978cca3ad8c0baa5205054b5b3802e64.zip chromium_src-a4a3292e978cca3ad8c0baa5205054b5b3802e64.tar.gz chromium_src-a4a3292e978cca3ad8c0baa5205054b5b3802e64.tar.bz2 |
Convert internal time format to Windows 1601 epoch on Linux & Mac.
Although we represent time internally starting from 1601, there are still
things like time explosion that will not work before the year 1900. This
limitation is the same as it was previously.
BUG=14734
Review URL: http://codereview.chromium.org/173296
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time.h')
-rw-r--r-- | base/time.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base/time.h b/base/time.h index beeca27..a57c04f 100644 --- a/base/time.h +++ b/base/time.h @@ -178,6 +178,15 @@ class Time { static const int64 kNanosecondsPerSecond = kNanosecondsPerMicrosecond * kMicrosecondsPerSecond; +#if !defined(OS_WIN) + // On Mac & Linux, this value is the delta from the Windows epoch of 1601 to + // the Posix delta of 1970. This is used for migrating between the old + // 1970-based epochs to the new 1601-based ones. It should be removed from + // this global header and put in the platform-specific ones when we remove the + // migration code. + static const int64 kWindowsEpochDeltaMicroseconds; +#endif + // Represents an exploded time that can be formatted nicely. This is kind of // like the Win32 SYSTEMTIME structure or the Unix "struct tm" with a few // additions and changes to prevent errors. |