summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2022-03-29 19:10:44 (EDT)
committer P. J. McDermott <pj@pehjota.net>2022-03-29 19:13:23 (EDT)
commit84ced681a24c5ea7223f8f33554eb42266baab60 (patch)
tree639e90d10316fb4251d554fe3c5ed279b67aa233 /src
parent5d52752e0cb715a1af4095c890dc623ce369f1ac (diff)
downloadatsign-84ced681a24c5ea7223f8f33554eb42266baab60.zip
atsign-84ced681a24c5ea7223f8f33554eb42266baab60.tar.gz
atsign-84ced681a24c5ea7223f8f33554eb42266baab60.tar.bz2
datetime: Drop newly unused use of timegm()
It's non-standard.
Diffstat (limited to 'src')
-rw-r--r--src/datetime.c22
-rw-r--r--src/datetime.h3
2 files changed, 0 insertions, 25 deletions
diff --git a/src/datetime.c b/src/datetime.c
index 2c971a4..0bba344 100644
--- a/src/datetime.c
+++ b/src/datetime.c
@@ -33,18 +33,6 @@
#include "datetime.h"
#include "formats.h"
-static struct tm DATETIME_EPOCH_ = {
- .tm_sec = 0,
- .tm_min = 0,
- .tm_hour = 0,
- .tm_mday = 1,
- .tm_mon = 0,
- .tm_year = 70,
- .tm_wday = 4,
- .tm_yday = 0,
- .tm_isdst = -1,
-};
-
static void
_datetime_buf_cpy_p(char *dst, const char *src)
{
@@ -403,13 +391,3 @@ datetime_strftime_misc(const struct tm *tm, char **out, size_t *buf_sz,
return _datetime_strftime(FORMATS_MISC, tm, out, buf_sz, buf, i);
}
-
-double
-datetime_diff_epoch(time_t t)
-{
- time_t epoch;
-
- epoch = timegm(&DATETIME_EPOCH_);
-
- return difftime(t, epoch);
-}
diff --git a/src/datetime.h b/src/datetime.h
index 9de8799..1094cf8 100644
--- a/src/datetime.h
+++ b/src/datetime.h
@@ -38,7 +38,4 @@ int
datetime_strftime_misc(const struct tm *tm, char **out, size_t *out_sz,
char **buf, size_t *i);
-double
-datetime_diff_epoch(time_t t);
-
#endif /* DATETIME_H_ */