コード例 #1
0
#--REGULAR IMPORTS-------------------------------------------------------------

import acstime
from Acspy.Common.TimeHelper     import getTimeStamp
from Acspy.Common.EpochHelper    import EpochHelper
from Acspy.Common.DurationHelper import DurationHelper
#------------------------------------------------------------------------------
print "DWF...need a real test here!!!"

# format string using all possible
allOut = "%G %g %x\n%Y %y %m %h %j %d %e %w %a %H:%M:%S.%q %1q %2q %3q %4q %5q %6q"

e1 = EpochHelper()	
e2 = EpochHelper()
	
d1 = DurationHelper()
	
# create an Epoch structure
eout = getTimeStamp()
	
e1.value(eout)
	
pStr = e1.toString(acstime.TSArray,
                   "%x",
                   0L, 
                   0L)
	
#print "Current time is " , pStr 

# test Epoch range & toUTUdate(), toJulianYear()
eout.value = 0xFFFFFFFFFFFFFFFA
コード例 #2
0
# You should have received a copy of the GNU Library General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc.,
# 675 Massachusetts Ave, Cambridge, MA 02139, USA.  Correspondence concerning
# ALMA should be addressed as follows:
#
# Internet email: [email protected]
'''
'''
#--REGULAR IMPORTS-------------------------------------------------------------

import acstime
from Acspy.Common.DurationHelper import DurationHelper
#------------------------------------------------------------------------------
print "----------------------"
d1 = DurationHelper(0x7FFFFFFFFFFFFFFA)
print d1.toString("")
print "----------------------"
d1.value(long(0))
print d1.toString("")
print "----------------------"
#For some reason or another, this test taken from the C++ modular test of acstime
#causes overflow errors in Python! Commented out for now
#d1.value(0x8000000000000008 + 8L)
#print d1.toString("")
print "----------------------"
d1.fromString("10675199 02:48:05.47758")
print d1.value().value
print "----------------------"
d1.fromString("0:0:0")
print d1.value().value
コード例 #3
0
# You should have received a copy of the GNU Library General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc.,
# 675 Massachusetts Ave, Cambridge, MA 02139, USA.  Correspondence concerning
# ALMA should be addressed as follows:
#
# Internet email: [email protected]
'''
'''
#--REGULAR IMPORTS-------------------------------------------------------------

import acstime
from Acspy.Common.DurationHelper import DurationHelper
#------------------------------------------------------------------------------
print "----------------------"
d1 = DurationHelper(0x7FFFFFFFFFFFFFFA)
print d1.toString("")
print "----------------------"
d1.value(long(0))
print d1.toString("")
print "----------------------"
#For some reason or another, this test taken from the C++ modular test of acstime
#causes overflow errors in Python! Commented out for now
#d1.value(0x8000000000000008 + 8L)
#print d1.toString("")
print "----------------------"
d1.fromString("10675199 02:48:05.47758")
print d1.value().value
print "----------------------"
d1.fromString("0:0:0")
print d1.value().value