summaryrefslogtreecommitdiff
path: root/src/libstddjb/skalibs_tzisright.c
blob: f8414a67c885907b189520f353738341948aca99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 ;
}