[Python-checkins] python/dist/src/Lib/plat-mac macfs.py,1.5,1.6

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
2003年1月22日 06:04:20 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv23734
Modified Files:
	macfs.py 
Log Message:
Tweaked time conversion to work in MacPython-OS9.
Index: macfs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/macfs.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** macfs.py	21 Jan 2003 22:58:39 -0000	1.5
--- macfs.py	22 Jan 2003 14:04:18 -0000	1.6
***************
*** 32,36 ****
 		return int(t)
 	def _time2utc(t):
! 		t = t - _EPOCHCONVERT
 		if t < -0x7fffffff:
 			t = t + 0x10000000L
--- 32,36 ----
 		return int(t)
 	def _time2utc(t):
! 		t = int(t) - _EPOCHCONVERT
 		if t < -0x7fffffff:
 			t = t + 0x10000000L
***************
*** 38,42 ****
 else:
 	def _utc2time(utc): return utc[1]
! 	def _time2utc(t): return (0, t, 0)
 
 # The old name of the error object:
--- 38,45 ----
 else:
 	def _utc2time(utc): return utc[1]
! 	def _time2utc(t):
! 		if t > 0x7fffffff:
! 			t = t - 0x100000000L
! 		return (0, int(t), 0)
 
 # The old name of the error object:

AltStyle によって変換されたページ (->オリジナル) /