aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-05-31 12:17:29 +0200
committerChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-05-31 12:17:29 +0200
commitc5bca3ec178c2c70762314c1e5657218dbd872bb (patch)
treed9ff749090773f0047a4e262dce615ce1ed876f9
parentadd ISO 8601 and "default" strftime prebaked formats (diff)
no longer hardcode the offset in time tostring
-rw-r--r--src/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time.c b/src/time.c
index da190cf..e43b3cc 100644
--- a/src/time.c
+++ b/src/time.c
@@ -24,9 +24,9 @@ static int jd_time_get(void *p, Janet key, Janet *out) {
}
// time_t is always a UTC-representation
-// we hard-code the offset because of a macOS bug
static void jd_time_tostring(void *p, JanetBuffer *buffer) {
- strftime_buffer("%F %T.000 +0000", gmtime(p), buffer);
+ // print ISO 8601
+ strftime_buffer("%F %T%z", gmtime(p), buffer);
}
static const JanetAbstractType jd_time_t = {