logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git

iso_parse.h (530B)


  1. // utils-std: Collection of commonly available Unix tools
  2. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. // SPDX-License-Identifier: MPL-2.0
  4. #include <time.h> /* struct tm */
  5. // Sets errstr on failure
  6. // YYYY-MM-DD[T ]hh:mm:SS([,\.]frac)?(Z|[+\-]hh:?mm)?
  7. extern char *iso_parse(char *arg, struct tm *time, long *nsec, const char **errstr);
  8. // Because mktime() messes with tm_gmtoff yet doesn't applies the offset
  9. // Returns (time_t)-1 on failure
  10. extern time_t mktime_tz(struct tm *tm);