From 4fd65aec913a1b99e8d748a7a82c150b8f7ee510 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 2 Jan 2015 10:15:29 +0000 Subject: Remove the --enable-right-tz configure option. Make it a run-time autodetection instead. Update doc. Thanks to Paul Jarc for the suggestion. --- src/libstddjb/skalibs_tzisright.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/libstddjb/skalibs_tzisright.c (limited to 'src/libstddjb/skalibs_tzisright.c') 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 +#include +#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 ; +} -- cgit v1.2.3