leap

package module
v0.0.0-...-3dea644 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Utility package for juggling leapseconds

Index

Constants

This section is empty.

Variables

View Source
var Seconds = []int64{
	time.Date(2015, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(2012, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(2008, 12, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(2005, 12, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1998, 12, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1997, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1995, 12, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1994, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1993, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1992, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1990, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1989, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1987, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1985, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1983, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1982, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1981, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1976, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1976, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1976, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1976, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1975, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1974, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1973, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1972, 12, 31, 23, 59, 59, 0, time.UTC).Unix(),
	time.Date(1972, 06, 30, 23, 59, 59, 0, time.UTC).Unix(),
}

A list of all two-second-long POSIX timestamps that cross a leap second.

Functions

func LeapDiff

func LeapDiff(t1 time.Time, t2 time.Time) time.Duration

Get the number of leap seconds that occured between two times.

func NumLeaps

func NumLeaps(t time.Time) time.Duration

Get the number of leap seconds that occured before this time.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL