File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,12 @@ def validate_statement(self, stmt):
197
197
timestamp = stmt ['timestamp' ]
198
198
try :
199
199
parse_datetime (timestamp )
200
+
201
+ # Reject statements that don't comply with ISO 8601 offsets
202
+ if timestamp .endswith ("-00" ) or timestamp .endswith ("-0000" ) or timestamp .endswith ("-00:00" ):
203
+ self .return_error (
204
+ "Timestamp error - Statement Timestamp Illegal offset (-00, -0000, or -00:00) %s" % timestamp )
205
+
200
206
except Exception as e :
201
207
self .return_error (
202
208
"Timestamp error - There was an error while parsing the date from %s -- Error: %s" % (timestamp , e .message ))
@@ -640,6 +646,12 @@ def validate_substatement(self, substmt):
640
646
timestamp = substmt ['timestamp' ]
641
647
try :
642
648
parse_datetime (timestamp )
649
+
650
+ # Reject statements that don't comply with ISO 8601 offsets
651
+ if timestamp .endswith ("-00" ) or timestamp .endswith ("-0000" ) or timestamp .endswith ("-00:00" ):
652
+ self .return_error (
653
+ "Timestamp error - Substatement Timestamp Illegal offset (-00, -0000, or -00:00) %s" % timestamp )
654
+
643
655
except Exception as e :
644
656
self .return_error (
645
657
"Timestamp error - There was an error while parsing the date from %s -- Error: %s" % (timestamp , e .message ))
You can’t perform that action at this time.
0 commit comments