Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodbtools
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
zodbtools
Commits
53d928fd
Commit
53d928fd
authored
Jan 12, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidrange-formats: fix references time timezones - disable unsupported cases
parent
ba2dbac0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
29 deletions
+43
-29
zodbtools/test/testdata/tidrange-formats.txt
zodbtools/test/testdata/tidrange-formats.txt
+43
-29
No files found.
zodbtools/test/testdata/tidrange-formats.txt
View file @
53d928fd
# This is the supported time formats for zodbutils <tidrange>
# Format of this file is:
# <
tid in hex format> <time
>
# <
reference time> <tid in hex format> <time input format
>
#
# arbitrary reference time: 2009-08-30T19:20:00Z
# These must be run with current time: 2009-08-30T19:20:00Z
# in Europe/Paris timezone.
# ( as a timestamp: 1251660000 )
# XXX for now it's RFC3339 and not hex tid
# git test for approxidate
# some absolute date formats
# RFC3339
2018-01-01T10:30:00Z 2018-01-01T10:30:00Z
1985-04-12T23:20:50Z 1985-04-12T23:20:50.52Z
1996-12-20T00:39:57Z 1996-12-19T16:39:57-08:00
# based on git's test for approxidate (adapted for timezone
# Europe/Paris and extended a bit)
2009-08-30T19:20:00Z now
2009-08-30T19:19:55Z 5 seconds ago
2009-08-30T19:19:55Z 5.seconds.ago
...
...
@@ -16,39 +24,49 @@
2009-08-27T19:20:00Z 3.days.ago
2009-08-09T19:20:00Z 3.weeks.ago
2009-05-30T19:20:00Z 3.months.ago
2009-08-30T19:19:00Z 1 minute ago
2009-08-29T19:20:00Z 1 day ago
2009-07-30T19:20:00Z 1 month ago
# go's when does not support "chaining" like this
# 2007-05-30T19:20:00Z 2.years.3.months.ago
2009-08-29T06:00:00Z 6am yesterday
2009-08-29T18:00:00Z 6pm yesterday
2009-08-30T03:00:00Z 3:00
2009-08-30T15:00:00Z 15:00
2009-08-30T12:00:00Z noon today
2009-08-29T12:00:00Z noon yesterday
#2007-05-30T19:20:00Z 2.years.3.months.ago
2009-08-29T04:00:00Z 6am yesterday
2009-08-29T16:00:00Z 6pm yesterday
2009-08-30T01:00:00Z 3:00
2009-08-30T13:00:00Z 15:00
2009-08-30T10:00:00Z noon today
2009-08-29T10:00:00Z noon yesterday
# this input is a bit weird also, what does "noon pm" mean?
# it seems to trigger a bug in python's parser
# 2009-01-05T12:00:00Z January 5th noon pm
# TypeError: can't compare offset-naive and offset-aware datetimes
#2009-01-05T12:00:00Z January 5th noon pm
# this input is "ambiguous"
#
2009-08-29T12:00:00Z 10am noon
#2009-08-29T12:00:00Z 10am noon
# not supported by date parser
#
2009-08-25T19:20:00Z last tuesday
#2009-08-25T19:20:00Z last tuesday
# non consistent behavior ( go keep current hour:minutes - python use midnight )
# 2009-07-05T00:00:00Z July 5th
2009-06-05T00:00:00Z 06/05/2009
# parsed as month/day (at least for me ... it might depend on some locales ?)
# this also TypeError on python
#2009-07-05T00:00:00Z July 5th
# parsed as month/day (at least for me ... it might depend on some locale settings other than $TZ ?)
#2009-05-06T00:00:00Z 06.05.2009
# go parser is wrong on this one
#
2009-06-06T05:00:00Z Jun 6, 5AM
#2009-06-06T05:00:00Z Jun 6, 5AM
# go parser is wrong on this one
# 2009-06-06T05:00:00Z 5AM Jun 6
2009-06-07T06:00:00Z 6AM, June 7, 2009
#2009-06-06T05:00:00Z 5AM Jun 6
2009-06-07T04:00:00Z 6AM, June 7, 2009
2008-12-01T00:00:00Z 2008-12-01
2009-12-01T00:00:00Z 2009-12-01
# python and go disagree on these two, go see them as 00:00 UTC
#2008-11-30T23:00:00Z 2008-12-01
#2009-11-30T23:00:00Z 2009-12-01
#2009-06-04T22:00:00Z 06/05/2009
# some more cases
...
...
@@ -61,11 +79,7 @@
#\x03\xc4\x85:\x00\x00\x00\x00 2018-01-01 10:30
#\x03\xc4\x88d\x00\x00\x00\x00 2018-01-02
2009-08-30T19:19:00Z 1 minute ago
2009-08-29T19:20:00Z yesterday
2009-08-29T19:20:00Z 1 day ago
2009-07-30T19:20:00Z 1 month ago
### not supported:
2018-01-01T10:30:00Z le 1er janvier 2018 à 10h30
2018-01-02T00:00:00Z 2018年1月2日
\ No newline at end of file
### works with python implementation, but not supported:
# 2018-01-01T09:30:00Z le 1er janvier 2018 à 10h30
# 2018-01-01T23:00:00Z 2018年1月2日
\ No newline at end of file
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