Skip to content

Commit 2f2ffef

Browse files
committed
naively try truncating if things fail
1 parent 7b13b3e commit 2f2ffef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/parsing.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,16 @@ function pqparse(::Type{Time}, str::AbstractString)
299299
return parse(Time, str)
300300
catch err
301301
if !(err isa InexactError)
302+
try
303+
return parse(Time, _trunc_seconds(str))
304+
catch _
305+
pass
306+
end
302307
rethrow(err)
303308
end
304309
end
305310

306-
return parse(Time, _trunc_seconds(str))
311+
307312
end
308313

309314
# InfExtendedTime support for Dates.TimeType

0 commit comments

Comments
 (0)