Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ec3cdb1b
Commit
ec3cdb1b
authored
Jul 27, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All mac compilers now use 1904 as the Epoch...
parent
2e0accec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
Modules/timemodule.c
Modules/timemodule.c
+4
-6
No files found.
Modules/timemodule.c
View file @
ec3cdb1b
...
...
@@ -69,15 +69,13 @@ time_time(self, args)
if
(
!
getnoarg
(
args
))
return
NULL
;
time
(
&
secs
);
#ifdef applec
/* MPW */
/* Difference in origin between Mac and Unix clocks: */
/* For THINK C 3.0 add a correction like 5*3600;
it converts to UCT from local assuming EST */
#ifdef macintosh
/* The Mac epoch is 1904, while UNIX uses 1970; Python prefers 1970 */
/* Moreover, the Mac returns local time. This we cannot fix... */
#define TIMEDIFF ((time_t) \
(((1970-1904)*365L + (1970-1904)/4) * 24 * 3600))
secs
-=
TIMEDIFF
;
/* XXX It's almost better to directly fetch the Mac clock... */
#endif
/* applec */
#endif
return
newintobject
((
long
)
secs
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment