@@ -281,7 +281,7 @@ class InvalidValues:
281281 ]
282282
283283 # Strings which are not in acceptable date time format
284- for_date_time_string_formats = [
284+ for_date_time_string_formats_for_relaxed_timezone = [
285285 "" , # Empty string
286286 "invalid" , # Invalid format
287287 "20000101" , # Date digits only (i.e. without hypens)
@@ -290,10 +290,6 @@ class InvalidValues:
290290 "2000" , # Year only
291291 "2000-01" , # Year and month only
292292 "2000-01-01T00:00:00+00" , # Date and time with GMT timezone offset only in hours
293- "2000-01-01T00:00:00-00:00" , # Date and time with negative GMT timezone offset
294- "2000-01-01T00:00:00-01:00" , # Date and time with negative GMT timezone offset
295- "2000-01-01T00:00:00-05:00" , # Date and time with negative offset asides from GMT and BST
296- "2000-01-01T00:00:00+05:00" , # Date and time with offset asides from GMT and BST
297293 "2000-01-01T00:00:00+01" , # Date and time with BST timezone offset only in hours
298294 "12000-01-01T00:00:00+00:00" , # Extra character at start of string
299295 "2000-01-01T00:00:00+00:001" , # Extra character at end of string
@@ -302,7 +298,6 @@ class InvalidValues:
302298 "2000-01-0122:22:22+00:00.000" , # Missing T (with milliseconds)
303299 "2000-01-01T222222+00:00" , # Missing time colons
304300 "2000-01-01T22:22:2200:00" , # Missing timezone indicator
305- "2000-01-01T22:22:22-0100" , # Missing timezone colon
306301 "2000-01-01T22:22:22-01" , # Timezone hours only
307302 "99-01-01T00:00:00+00:00" , # Missing century (i.e. only 2 digits for year)
308303 "01-01-2000T00:00:00+00:00" , # Date in wrong order (DD-MM-YYYY)
@@ -323,40 +318,14 @@ class InvalidValues:
323318 "2000-01-01T00:00:00+00:60" , # Timezone minute 60
324319 ]
325320
326- for_date_time_string_formats_for_recorded = [
327- "" , # Empty string
328- "invalid" , # Invalid format
329- "20000101" , # Date digits only (i.e. without hypens)
330- "20000101000000" , # Date and time digits only
331- "200001010000000000" , # Date, time and timezone digits only
332- "2000" , # Year only
333- "2000-01" , # Year and month only
334- "2000-01-01T00:00:00+00" , # Date and time with GMT timezone offset only in hours
335- "2000-01-01T00:00:00+01" , # Date and time with BST timezone offset only in hours
336- "12000-01-01T00:00:00+00:00" , # Extra character at start of string
337- "2000-01-01T00:00:00+00:001" , # Extra character at end of string
338- "12000-01-02T00:00:00-01:001" , # Extra characters at start and end of string
339- "2000-01-0122:22:22+00:00" , # Missing T
340- "2000-01-0122:22:22+00:00.000" , # Missing T (with milliseconds)
341- "2000-01-01T222222+00:00" , # Missing time colons
342- "2000-01-01T22:22:2200:00" , # Missing timezone indicator
343- "2000-01-01T22:22:22-01" , # Timezone hours only
344- "99-01-01T00:00:00+00:00" , # Missing century (i.e. only 2 digits for year)
345- "01-01-2000T00:00:00+00:00" , # Date in wrong order (DD-MM-YYYY)
346- ]
347-
348- for_date_times_for_recorded = [
349- "2000-00-01T00:00:00+00:00" , # Month 00
350- "2000-13-01T00:00:00+00:00" , # Month 13
351- "2000-01-32T00:00:00+00:00" , # Day 32
352- "2000-02-30T00:00:00+00:00" , # Invalid month and day combination (30th February)
353- "2000-01-01T24:00:00+00:00" , # Hour 24
354- "2000-01-01T00:60:00+00:00" , # Minute 60
355- "2000-01-01T00:00:60+00:00" , # Second 60
356- "2000-01-01T00:00:00+00:60" , # Timezone minute 60
321+ for_date_time_string_formats_for_strict_timezone = for_date_time_string_formats_for_relaxed_timezone + [
322+ "2000-01-01T22:22:22-0100" , # Missing timezone colon
323+ "2000-01-01T00:00:00-01:00" , # Date and time with negative GMT timezone offset
324+ "2000-01-01T00:00:00-05:00" , # Date and time with negative offset asides from GMT and BST
325+ "2000-01-01T00:00:00+05:00" , # Date and time with offset asides from GMT and BST
326+ "2000-01-01T00:00:00-00:00" , # Date and time with negative GMT timezone offset
357327 ]
358328
359-
360329 for_lists_of_strings_of_length_1 = [[1 ], [False ], [["Test1" ]]]
361330
362331 for_lists_of_dicts_of_length_1 = [[1 ], [False ], [["Invalid" ]], ["Invalid" ]]
0 commit comments