summaryrefslogtreecommitdiff
path: root/src/time/ISO8601.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-07-23 16:24:45 +0200
committerMax Kellermann <max@musicpd.org>2020-07-23 16:26:18 +0200
commita2f42e642446e54b3f5ddffa29e62f021b3ce7e5 (patch)
tree65192b41737cccf860e11df46776befea4067293 /src/time/ISO8601.cxx
parentbdfe6c2c4530830376bfbcbd83fa7b20e434046f (diff)
time/ISO8601: use <cstdlib>
Diffstat (limited to 'src/time/ISO8601.cxx')
-rw-r--r--src/time/ISO8601.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/time/ISO8601.cxx b/src/time/ISO8601.cxx
index 514c8a23b..067e4c4ee 100644
--- a/src/time/ISO8601.cxx
+++ b/src/time/ISO8601.cxx
@@ -35,10 +35,9 @@
#include "util/StringBuffer.hxx"
#include <cassert>
+#include <cstdlib>
#include <stdexcept>
-#include <stdlib.h>
-
StringBuffer<64>
FormatISO8601(const struct tm &tm) noexcept
{
@@ -65,7 +64,7 @@ static std::pair<unsigned, unsigned>
ParseTimeZoneOffsetRaw(const char *&s)
{
char *endptr;
- unsigned long value = strtoul(s, &endptr, 10);
+ unsigned long value = std::strtoul(s, &endptr, 10);
if (endptr == s + 4) {
s = endptr;
return std::make_pair(value / 100, value % 100);
@@ -75,7 +74,7 @@ ParseTimeZoneOffsetRaw(const char *&s)
unsigned hours = value, minutes = 0;
if (*s == ':') {
++s;
- minutes = strtoul(s, &endptr, 10);
+ minutes = std::strtoul(s, &endptr, 10);
if (endptr != s + 2)
throw std::runtime_error("Failed to parse time zone offset");