[Zope] TimeError when using fmt="%Y-%m-%d"
Andreas Jung
Andreas Jung" <andreas@zope.com
Mon, 29 Oct 2001 10:38:44 -0500
What is the value of FirstContactDate ?
Andreas
----- Original Message -----
From: "Jean Jordaan" <jean@upfrontsystems.co.za>
To: <zope@zope.org>
Sent: Monday, October 29, 2001 10:29
Subject: [Zope] TimeError when using fmt="%Y-%m-%d"
> Hi all
>
> This snippet generates a TimeError (I've appended the traceback
> below)::
>
> <input
> name="FirstContactDate"
> value="<dtml-var FirstContactDate fmt="%Y-%m-%d">"
> size="10">
>
> This, however, works fine::
>
> <input
> name="FirstContactDate"
> value="<dtml-var FirstContactDate fmt="year"
> >-<dtml-var FirstContactDate fmt="month"
> >-<dtml-var FirstContactDate fmt="day">"
> size="10">
>
> The fmt="%Y-%m-%d" idiom works fine elsewhere in my code.
> Any idea what might be wrong with the first snippet above?
>
> Regards,
> Jean Jordaan
>
> Zope Error
> Zope has encountered an error while publishing this resource.
> Error Type: TimeError
> Error Value: The time -2208988800.000000 is beyond the range of this
Python
> implementation.
> [...]
>
> Traceback (innermost last):
> File /usr/local/zope/2-3-0/lib/python/ZPublisher/Publish.py, line 223,
in
> publish_module
> File /usr/local/zope/2-3-0/lib/python/ZPublisher/Publish.py, line 187,
in
> publish
> File /usr/local/zope/2-3-0/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: 1177)
> File /usr/local/zope/2-3-0/lib/python/ZPublisher/Publish.py, line 171,
in
> publish
> File /usr/local/zope/2-3-0/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: editProfileForm)
> File /usr/local/zope/2-3-0/lib/python/ZPublisher/Publish.py, line 112,
in
> call_object
> (Object: editProfileForm)
> File /usr/local/zope/2-3-0/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
> (Object: editProfileForm)
> File /usr/local/zope/2-3-0/lib/python/DocumentTemplate/DT_String.py,
line
> 540, in __call__
> (Object: editProfileForm)
> File /usr/local/zope/2-3-0/lib/python/DocumentTemplate/DT_With.py, line
> 151, in render
> (Object: Contacts.Profiles.getItem(new_profile_id))
> File /usr/local/zope/2-3-0/lib/python/OFS/DTMLMethod.py, line 182, in
> __call__
> (Object: viewOrEditProfile)
> File /usr/local/zope/2-3-0/lib/python/DocumentTemplate/DT_String.py,
line
> 540, in __call__
> (Object: viewOrEditProfile)
> File /usr/local/zope/2-3-0/lib/python/OFS/DTMLMethod.py, line 182, in
> __call__
> (Object: editInstanceForm)
> File /usr/local/zope/2-3-0/lib/python/DocumentTemplate/DT_String.py,
line
> 540, in __call__
> (Object: editInstanceForm)
> File /usr/local/zope/2-3-0/lib/python/DocumentTemplate/DT_In.py, line
719,
> in renderwob
> (Object: ProfileCategories.getAllProfileCategories(ProfileCategories))
> File /usr/local/zope/2-3-0/lib/python/DocumentTemplate/DT_Var.py, line
> 308, in render
> (Object: FirstContactDate)
> (Info: ('FirstContactDate', DateTime('1900/01/01'), {'fmt':
'%Y-%m-%d',
> '': 'FirstContactDate'}))
> File /usr/local/zope/2-3-0/lib/python/DateTime/DateTime.py, line 1621,
in
> __call__
> File /usr/local/zope/2-3-0/lib/python/DateTime/DateTime.py, line 1395,
in
> strftime
> File /usr/local/zope/2-3-0/lib/python/DateTime/DateTime.py, line 459, in
> safegmtime
> TimeError: (see above)
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>