projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aabd019
)
utils_time: cdtime_to_iso8601(): Include timezone information as well.
author
Sebastian Harl
<sh@tokkee.org>
Thu, 15 Nov 2012 14:14:10 +0000
(15:14 +0100)
committer
Sebastian Harl
<sh@tokkee.org>
Thu, 15 Nov 2012 14:14:10 +0000
(15:14 +0100)
src/utils_time.c
patch
|
blob
|
history
diff --git
a/src/utils_time.c
b/src/utils_time.c
index
f30dc0f
..
6789758
100644
(file)
--- a/
src/utils_time.c
+++ b/
src/utils_time.c
@@
-87,6
+87,11
@@
size_t cdtime_to_iso8601 (char *s, size_t max, cdtime_t t) /* {{{ */
len += (n < max - len) ? n : max - len;
}
+ if (max - len > 3) {
+ int n = strftime (s + len, max - len, "%z", &t_tm);
+ len += (n < max - len) ? n : max - len;
+ }
+
s[max - 1] = '\0';
return len;
} /* }}} size_t cdtime_to_iso8601 */