1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 17:23:15 +02:00

api: allow lower characters "t" and "z" in function util_parse_time

The following dates are now parsed with the same result:

  2025-08-30T20:12:55.866643Z
  2025-08-30t20:12:55.866643z
This commit is contained in:
Sébastien Helleu
2025-08-30 18:55:46 +02:00
parent 47c1128fb9
commit 1c09118fe1
3 changed files with 38 additions and 1 deletions
+3
View File
@@ -386,9 +386,12 @@ TEST(CoreUtil, ParseTime)
* expected: 2023-12-25T10:29:09.456789Z == 1703500149.456789
*/
WEE_PARSE_DATE(1, 1703500149, 0, "2023-12-25T10:29:09");
WEE_PARSE_DATE(1, 1703500149, 0, "2023-12-25t10:29:09");
WEE_PARSE_DATE(1, 1703500149, 0, "2023-12-25T10:29:09Z");
WEE_PARSE_DATE(1, 1703500149, 0, "2023-12-25t10:29:09z");
WEE_PARSE_DATE(1, 1703500149, 456000, "2023-12-25T10:29:09.456Z");
WEE_PARSE_DATE(1, 1703500149, 456789, "2023-12-25T10:29:09.456789Z");
WEE_PARSE_DATE(1, 1703500149, 456789, "2023-12-25t10:29:09.456789z");
/*
* expected: 2023-12-25T10:29:09.456789Z == 1703500149.456789