logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: 927cd33c9af29e7739094179131c454705babe2e
parent d7ddbe3788bd66f21aa71cc9fb8bb56d5e9c3160
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  7 Apr 2025 19:30:30 +0200

lib/iso_parse.c: Add notes around tzalloc and mktime_z from Austin Group Issue 1794

Diffstat:

Mlib/iso_parse.c2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/iso_parse.c b/lib/iso_parse.c @@ -23,6 +23,7 @@ static const char *short_month_name[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; // Parses [+|-]HH:?MM timezone offsets +// Would need tzalloc from <https://www.austingroupbugs.net/view.php?id=1794> to parse timezone names static char * tzoffset_parse(char *s, struct tm *time, const char **errstr) { @@ -443,6 +444,7 @@ iso_parse(char *arg, struct tm *time, long *nsec, const char **errstr) // Because mktime() messes with tm_gmtoff yet doesn't applies it, even in POSIX.1-2024 // Returns (time_t)-1 on failure +// Maybe should be replaced by mktime_z once <https://www.austingroupbugs.net/view.php?id=1794> gets accepted and implemented time_t mktime_tz(struct tm *tm) {