Commit 53d928fd authored by Jérome Perrin's avatar Jérome Perrin

tidrange-formats: fix references time timezones - disable unsupported cases

parent ba2dbac0
# 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
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