File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
datafusion/functions/src/datetime Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ fn has_explicit_timezone(value: &str) -> bool {
281281 }
282282
283283 // Heuristic: trailing numeric offset like +0500, +05:00, -0330, etc.
284- if let Some ( pos) = v. rfind ( |c| c == '+' || c == '-' ) {
284+ if let Some ( pos) = v. rfind ( |c| [ '+' , '-' ] . contains ( & c ) ) {
285285 // Exclude scientific notation like 1.5e+10 (preceded by 'e' or 'E')
286286 if !( pos > 0
287287 && v. chars ( )
@@ -292,7 +292,7 @@ fn has_explicit_timezone(value: &str) -> bool {
292292 // Ensure the sign likely follows a time component. Look for a separator
293293 // (space or 'T') before the sign and check for a ':' between that
294294 // separator and the sign to avoid treating date dashes as offsets.
295- let sep_pos = v[ ..pos] . rfind ( |c| c == ' ' || c == 'T' || c == 't' ) ;
295+ let sep_pos = v[ ..pos] . rfind ( |c| [ ' ' , 'T' , 't' ] . contains ( & c ) ) ;
296296 let has_time_before_sign = if let Some ( spos) = sep_pos {
297297 v[ spos + 1 ..pos] . contains ( ':' )
298298 } else {
You can’t perform that action at this time.
0 commit comments