dateutils
dateutils copied to clipboard
Exit status of strptime in case of error is 0
I'm running the following on Ubuntu 18 Package: dateutils Version: 0.4.2-1
ubuntu@testy:~$ dateutils.strptime -i '%d/%m/%Y %H:%M:%S' 'no date here'
strptime: cannot make sense of `no date here' using the given input formats
ubuntu@testy:~$ echo $?
0
The exit code of the dateutils.strptime is 0 if it can't parse the input.
Is it intentional? I'm expecting a non-zero exit status to catch the error in my scripts.
Hey there, thank you for your report. Indeed this was an oversight. It should be fixed in 22cd659d3.