summaryrefslogtreecommitdiffstats
path: root/src/gl/parse-datetime.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:33:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:33:12 +0000
commit36082a2fe36ecd800d784ae44c14f1f18c66a7e9 (patch)
tree6c68e0c0097987aff85a01dabddd34b862309a7c /src/gl/parse-datetime.h
parentInitial commit. (diff)
downloadgnutls28-36082a2fe36ecd800d784ae44c14f1f18c66a7e9.tar.xz
gnutls28-36082a2fe36ecd800d784ae44c14f1f18c66a7e9.zip
Adding upstream version 3.7.9.upstream/3.7.9upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/gl/parse-datetime.h')
-rw-r--r--src/gl/parse-datetime.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gl/parse-datetime.h b/src/gl/parse-datetime.h
new file mode 100644
index 0000000..1de20ef
--- /dev/null
+++ b/src/gl/parse-datetime.h
@@ -0,0 +1,31 @@
+/* Parse a string into an internal timestamp.
+
+ Copyright (C) 1995, 1997-1998, 2003-2004, 2007, 2009-2021 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <stdbool.h>
+#include <time.h>
+
+bool parse_datetime (struct timespec *restrict,
+ char const *, struct timespec const *);
+
+/* parse_datetime2 flag: if set, print debug/progress information to STDERR */
+#define PARSE_DATETIME_DEBUG 1
+
+/* same as above, supporting additional flags */
+bool parse_datetime2 (struct timespec *restrict,
+ char const *, struct timespec const *,
+ unsigned int flags, timezone_t, char const *);