Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
70345deb
Commit
70345deb
authored
Jan 18, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DateTimePatch: document _parse patch and make it support DateTime 4
parent
5b6d4788
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
product/ERP5Type/patches/DateTimePatch.py
product/ERP5Type/patches/DateTimePatch.py
+10
-0
No files found.
product/ERP5Type/patches/DateTimePatch.py
View file @
70345deb
...
...
@@ -70,6 +70,13 @@ def DateTime__getstate__(self):
DateTimeKlass
.
__getstate__
=
DateTime__getstate__
# ERP5 Patch to have different parsing rules.
# We have a patch since e0eba4791a (Authorised date manipulation before
# year 1000, 2008-01-28), which replaced the method with an implementation
# that did not change since, so we don't have new behaviors of DateTime
# the most visible change might be that we don't have "timezone naive"
# support.
def
DateTime_parse
(
self
,
st
,
datefmt
=
getDefaultDateFormat
()):
# Parse date-time components from a string
month
=
year
=
tz
=
tm
=
None
...
...
@@ -92,6 +99,9 @@ def DateTime_parse(self, st, datefmt=getDefaultDateFormat()):
else
:
tz
=
None
# Decide later, since the default time zone
# could depend on the date.
# XXX we don't support timezone naive in this patch
self
.
_timezone_naive
=
False
ints
,
dels
=
[],[]
i
,
l
=
0
,
len
(
st
)
while
i
<
l
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment