Skip to content

Commit dd97978

Browse files
committed
validation regex for l.c. "t" in a time stamp
strictly speaking, ISO 8601 calls for an upper case T, but our regex already allows a space or a T, so adding t seems like no big deal
1 parent a4ef461 commit dd97978

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xdifile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ int xdi_is_datestring(char *inp) {
919919
struct slre_cap caps[6];
920920
int year, month, day, hour, minute, sec;
921921
char word[4] = {'\0'};
922-
regex_status = slre_match("^(\\d\\d\\d\\d)-(\\d\\d?)-(\\d\\d?)[T ](\\d\\d?):(\\d\\d):(\\d\\d).*$",
922+
regex_status = slre_match("^(\\d\\d\\d\\d)-(\\d\\d?)-(\\d\\d?)[Tt ](\\d\\d?):(\\d\\d):(\\d\\d).*$",
923923
inp, strlen(inp), caps, 6, 0);
924924
/* SLRE_INT, sizeof(sec), &year, */
925925
/* SLRE_INT, sizeof(sec), &month, */

0 commit comments

Comments
 (0)