summaryrefslogtreecommitdiffstats
path: root/libnetdata/datetime
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 11:19:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-24 09:53:24 +0000
commitb5f8ee61a7f7e9bd291dd26b0585d03eb686c941 (patch)
treed4d31289c39fc00da064a825df13a0b98ce95b10 /libnetdata/datetime
parentAdding upstream version 1.44.3. (diff)
downloadnetdata-b5f8ee61a7f7e9bd291dd26b0585d03eb686c941.tar.xz
netdata-b5f8ee61a7f7e9bd291dd26b0585d03eb686c941.zip
Adding upstream version 1.46.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--libnetdata/datetime/Makefile.am8
-rw-r--r--libnetdata/datetime/README.md11
-rw-r--r--src/libnetdata/datetime/iso8601.c (renamed from libnetdata/datetime/iso8601.c)0
-rw-r--r--src/libnetdata/datetime/iso8601.h (renamed from libnetdata/datetime/iso8601.h)0
-rw-r--r--src/libnetdata/datetime/rfc3339.c (renamed from libnetdata/datetime/rfc3339.c)6
-rw-r--r--src/libnetdata/datetime/rfc3339.h (renamed from libnetdata/datetime/rfc3339.h)0
-rw-r--r--src/libnetdata/datetime/rfc7231.c (renamed from libnetdata/datetime/rfc7231.c)0
-rw-r--r--src/libnetdata/datetime/rfc7231.h (renamed from libnetdata/datetime/rfc7231.h)0
8 files changed, 3 insertions, 22 deletions
diff --git a/libnetdata/datetime/Makefile.am b/libnetdata/datetime/Makefile.am
deleted file mode 100644
index 161784b8f..000000000
--- a/libnetdata/datetime/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-AUTOMAKE_OPTIONS = subdir-objects
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-
-dist_noinst_DATA = \
- README.md \
- $(NULL)
diff --git a/libnetdata/datetime/README.md b/libnetdata/datetime/README.md
deleted file mode 100644
index ba2366316..000000000
--- a/libnetdata/datetime/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-title: "Datetime"
-custom_edit_url: https://github.com/netdata/netdata/edit/master/libnetdata/datetime/README.md
-sidebar_label: "Datetime"
-learn_topic_type: "Tasks"
-learn_rel_path: "Developers/libnetdata"
--->
-
-# Datetime
-
-Formatting dates and timestamps.
diff --git a/libnetdata/datetime/iso8601.c b/src/libnetdata/datetime/iso8601.c
index 8e3f4e027..8e3f4e027 100644
--- a/libnetdata/datetime/iso8601.c
+++ b/src/libnetdata/datetime/iso8601.c
diff --git a/libnetdata/datetime/iso8601.h b/src/libnetdata/datetime/iso8601.h
index ce4800963..ce4800963 100644
--- a/libnetdata/datetime/iso8601.h
+++ b/src/libnetdata/datetime/iso8601.h
diff --git a/libnetdata/datetime/rfc3339.c b/src/libnetdata/datetime/rfc3339.c
index 157e340d3..5c4e990dd 100644
--- a/libnetdata/datetime/rfc3339.c
+++ b/src/libnetdata/datetime/rfc3339.c
@@ -27,7 +27,7 @@ size_t rfc3339_datetime_ut(char *buffer, size_t len, usec_t now_ut, size_t fract
return 0;
}
- if (fractional_digits >= 0 && fractional_digits <= 9) {
+ if (fractional_digits >= 1 && fractional_digits <= 9) {
int fractional_part = (int)(now_ut % USEC_PER_SEC);
if (fractional_part && len - used_length > fractional_digits + 1) {
char format[] = ".%01d";
@@ -102,8 +102,8 @@ usec_t rfc3339_parse_ut(const char *rfc3339, char **endptr) {
if (*s == '+' || *s == '-') {
// Parse the hours:mins part of the timezone
- if (!isdigit(s[1]) || !isdigit(s[2]) || s[3] != ':' ||
- !isdigit(s[4]) || !isdigit(s[5]))
+ if (!isdigit((uint8_t)s[1]) || !isdigit((uint8_t)s[2]) || s[3] != ':' ||
+ !isdigit((uint8_t)s[4]) || !isdigit((uint8_t)s[5]))
return 0; // Parsing error
char tz_sign = *s;
diff --git a/libnetdata/datetime/rfc3339.h b/src/libnetdata/datetime/rfc3339.h
index 88ebb3ec8..88ebb3ec8 100644
--- a/libnetdata/datetime/rfc3339.h
+++ b/src/libnetdata/datetime/rfc3339.h
diff --git a/libnetdata/datetime/rfc7231.c b/src/libnetdata/datetime/rfc7231.c
index 4925ed2c9..4925ed2c9 100644
--- a/libnetdata/datetime/rfc7231.c
+++ b/src/libnetdata/datetime/rfc7231.c
diff --git a/libnetdata/datetime/rfc7231.h b/src/libnetdata/datetime/rfc7231.h
index 5ba93053f..5ba93053f 100644
--- a/libnetdata/datetime/rfc7231.h
+++ b/src/libnetdata/datetime/rfc7231.h