Commit 7c88f8ea authored by 's avatar

Added a contributed fix for _nearsec handling.

parent b2e47b34
...@@ -84,10 +84,10 @@ ...@@ -84,10 +84,10 @@
############################################################################## ##############################################################################
"""Encapsulation of date/time values""" """Encapsulation of date/time values"""
__version__='$Revision: 1.29 $'[11:-2] __version__='$Revision: 1.30 $'[11:-2]
import sys,os,regex,DateTimeZone import sys, os, math, regex, DateTimeZone
from string import strip,split,upper,lower,atoi,atof,find,join from string import strip,split,upper,lower,atoi,atof,find,join
from time import time,gmtime,localtime,asctime,tzname,strftime,mktime from time import time,gmtime,localtime,asctime,tzname,strftime,mktime
from types import InstanceType,IntType,FloatType,StringType from types import InstanceType,IntType,FloatType,StringType
...@@ -626,7 +626,7 @@ class DateTime: ...@@ -626,7 +626,7 @@ class DateTime:
self._months[mo],self._months_a[mo],self._months_p[mo] self._months[mo],self._months_a[mo],self._months_p[mo]
self._fday,self._aday,self._pday= \ self._fday,self._aday,self._pday= \
self._days[dx],self._days_a[dx],self._days_p[dx] self._days[dx],self._days_a[dx],self._days_p[dx]
self._nearsec=round(sc) self._nearsec=math.floor(sc)
self._year,self._month,self._day =yr,mo,dy self._year,self._month,self._day =yr,mo,dy
self._hour,self._minute,self._second =hr,mn,sc self._hour,self._minute,self._second =hr,mn,sc
self.time,self._d,self._t,self._tz =s,d,t,tz self.time,self._d,self._t,self._tz =s,d,t,tz
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment