logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: faade53d0382ee2dfef54d2eeec6cc0ffa181388
parent 364aa7d79fa3fcd8f0506166383fd383b94c456c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 28 Apr 2025 17:28:39 +0200

lib/datetime_parse: Allow any amount of space between ISO date and time

Diffstat:

Mlib/datetime_parse.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/datetime_parse.c b/lib/datetime_parse.c @@ -344,6 +344,9 @@ iso_datetime_parse(char *arg, struct tm *time, long *nsec, const char **errstr) } s++; + for(; isspace(s[0]); s++) + ; + s = strptime(s, "%H:%M:%S", time); if(s == NULL) {