summaryrefslogtreecommitdiff
path: root/src/libstddjb/skalibs_tzisright.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/skalibs_tzisright.c')
-rw-r--r--src/libstddjb/skalibs_tzisright.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libstddjb/skalibs_tzisright.c b/src/libstddjb/skalibs_tzisright.c
new file mode 100644
index 0000000..f8414a6
--- /dev/null
+++ b/src/libstddjb/skalibs_tzisright.c
@@ -0,0 +1,17 @@
+/* ISC license. */
+
+#include <sys/types.h>
+#include <time.h>
+#include "djbtime-internal.h"
+
+int skalibs_tzisright ()
+{
+ static int tzisright = -1 ;
+ if (tzisright < 0)
+ {
+ struct tm tm ;
+ time_t t = 78796800 ;
+ if (localtime_r(&t, &tm)) tzisright = tm.tm_sec == 60 ;
+ }
+ return tzisright ;
+}