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
32417e7d
Commit
32417e7d
authored
Jan 22, 2003
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaked time conversion to work in MacPython-OS9.
parent
d44a3ec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Lib/plat-mac/macfs.py
Lib/plat-mac/macfs.py
+5
-2
No files found.
Lib/plat-mac/macfs.py
View file @
32417e7d
...
@@ -31,13 +31,16 @@ if time.gmtime(0)[0] == 1970:
...
@@ -31,13 +31,16 @@ if time.gmtime(0)[0] == 1970:
t
=
utc
[
1
]
+
_EPOCHCONVERT
t
=
utc
[
1
]
+
_EPOCHCONVERT
return
int
(
t
)
return
int
(
t
)
def
_time2utc
(
t
):
def
_time2utc
(
t
):
t
=
t
-
_EPOCHCONVERT
t
=
int
(
t
)
-
_EPOCHCONVERT
if
t
<
-
0x7fffffff
:
if
t
<
-
0x7fffffff
:
t
=
t
+
0x10000000
L
t
=
t
+
0x10000000
L
return
(
0
,
int
(
t
),
0
)
return
(
0
,
int
(
t
),
0
)
else
:
else
:
def
_utc2time
(
utc
):
return
utc
[
1
]
def
_utc2time
(
utc
):
return
utc
[
1
]
def
_time2utc
(
t
):
return
(
0
,
t
,
0
)
def
_time2utc
(
t
):
if
t
>
0x7fffffff
:
t
=
t
-
0x100000000
L
return
(
0
,
int
(
t
),
0
)
# The old name of the error object:
# The old name of the error object:
error
=
Carbon
.
File
.
Error
error
=
Carbon
.
File
.
Error
...
...
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