Commit 4a5e7902 authored by Romain Courteaud's avatar Romain Courteaud

Prevent strftime error when DateTime year < 1900

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22408 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b64f02a
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -158,7 +155,7 @@ for listboxline in listboxline_list:\n ...@@ -158,7 +155,7 @@ for listboxline in listboxline_list:\n
if isinstance(column_property, number):\n if isinstance(column_property, number):\n
string_property = "%0.2f+++++++" % (column_property)\n string_property = "%0.2f+++++++" % (column_property)\n
elif isinstance(column_property, DateTime):\n elif isinstance(column_property, DateTime):\n
string_property = column_property.strftime(\'%Y/%m/%d++++++\')\n string_property = "%s++++++" % column_property.Date()\n
else:\n else:\n
string_property = str(column_property or \'\')[:max_column_property_len]\n string_property = str(column_property or \'\')[:max_column_property_len]\n
if listboxline.isStatLine():\n if listboxline.isStatLine():\n
...@@ -246,6 +243,7 @@ return result\n ...@@ -246,6 +243,7 @@ return result\n
<string>listboxline</string> <string>listboxline</string>
<string>line_width</string> <string>line_width</string>
<string>col_count</string> <string>col_count</string>
<string>_inplacevar_</string>
<string>column_property</string> <string>column_property</string>
<string>string_property</string> <string>string_property</string>
<string>str</string> <string>str</string>
......
61 63
\ No newline at end of file \ No newline at end of file
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