skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

skalibs_tzisright.c (283B)


      1 /* ISC license. */
      2 
      3 #include <time.h>
      4 #include "djbtime-internal.h"
      5 
      6 int skalibs_tzisright ()
      7 {
      8   static int tzisright = -1 ;
      9   if (tzisright < 0)
     10   {
     11     struct tm tm ;
     12     time_t t = 78796800 ;
     13     if (localtime_r(&t, &tm)) tzisright = tm.tm_sec == 60 ;
     14   }
     15   return tzisright ;
     16 }