Why not just round the result?
That would be a nice option however I occasionally deal in fractions of a day so 31.5416666667 would round up to 32 days and not 31.5 days as I would require.
From what I can gather the Zope DateTime object is derived from the python mxDateTime module. mxDatetime instances appear to have a 'dst' variable which tells you whether DST is active or not. However, this variable does not seem to be present (or available) in a Zope DateTime instance :(
Thanks, Matt -- Matthew Anderson - Web Developer - Frontier Internet Services Limited Tel: 029 20 820 019 Fax: 029 20 820 037 http://www.frontier.net.uk Statements made are at all times subject to Frontier's Terms and Conditions of Business, which are available upon request. -----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: 07 October 2002 14:34 To: Matthew Anderson Cc: zope@zope.org Subject: Re: [Zope] DateTime DST query Matthew Anderson wrote:
<dtml-var "_.DateTime('2002-11-01 00:00') - _.DateTime('2002-10-01 00:00')">
would return 31.0416666667 days which is perfectly true but not a particularly nice way of showing a user
Why not just round the result? cheers, Chris