[Zope3-dev] Can we remove ZopeLegacy for now?
Nicola Larosa
nico@tekNico.net
Wed, 13 Mar 2002 13:01:38 +0100
This is a multi-part message in MIME format.
--------------000402040303050808020704
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
> The Wiki requirements so far have spelled out "no leap seconds, at least
> millisecond resolution, and works for at least 1800-3000". Guido's latest
> specific proposal answers those "no leap seconds, microsecond resolution,
> (proleptic Gregorian) years 1-9999".
Great. So the time has come to dust off my patch to Zope's DateTime.py
(attached), to go from four-digit to six-digit precision.
Unfortunately, it gives problems with PostgreSQL dates. :^((
--
"I was wondering if there's any kind of definitive nickname for Perl
programmers, the way we call ourselves Pythonistas?" - Aahz Maruch
"Masochists." - Daniel Klein
Nicola Larosa - nico@tekNico.net
--------------000402040303050808020704
Content-Type: text/plain;
name="DateTime.py.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="DateTime.py.diff"
--- DateTime.py Mon Oct 22 14:48:25 2001
+++ DateTime.py.NEW Mon Oct 22 16:00:36 2001
@@ -1558,11 +1558,11 @@
y,m,d =self._year,self._month,self._day
h,mn,s,t=self._hour,self._minute,self._second,self._tz
if(h+mn+s):
- if (s-int(s))> 0.0001:
+ if (s-int(s)) >= 0.000001:
try:
# For the seconds, print two digits
# before the decimal point.
- subsec = split('%g' % s, '.')[1]
+ subsec = split('%f' % s, '.')[1]
return '%4.4d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d.%s %s' % (
y,m,d,h,mn,s,subsec,t)
except:
--------------000402040303050808020704--