Fixing offset in (scheme time) - epoch is 00:00:10, which means there are 24, not 34 leap seconds.

This commit is contained in:
Alex Shinn 2012-03-11 18:19:32 +09:00
parent 13c80c07a0
commit 933680a838

View file

@ -1,12 +1,12 @@
/* time.c -- R7RS time routines */ /* time.c -- R7RS time routines */
/* Copyright (c) 2011 Alex Shinn. All rights reserved. */ /* Copyright (c) 2011-2012 Alex Shinn. All rights reserved. */
/* BSD-style license: http://synthcode.com/license.txt */ /* BSD-style license: http://synthcode.com/license.txt */
#include <time.h> #include <time.h>
#include <chibi/eval.h> #include <chibi/eval.h>
/* TODO: Check a leap second table file at appropriate intervals. */ /* TODO: Check a leap second table file at appropriate intervals. */
static time_t leap_seconds_since_epoch = 34; static time_t leap_seconds_since_epoch = 24;
static sexp sexp_current_second (sexp ctx, sexp self, sexp_sint_t n) { static sexp sexp_current_second (sexp ctx, sexp self, sexp_sint_t n) {
time_t res = time(NULL); time_t res = time(NULL);