Documentation
¶
Index ¶
- Constants
- func TAIFromUTC(unixSeconds int64) int64
- func UTCFromTAI(unixSeconds int64) int64
- type TAI64
- func (t TAI64) After(u TAI64) bool
- func (t TAI64) Before(u TAI64) bool
- func (t TAI64) GoTime() time.Time
- func (t TAI64) Marshal() []byte
- func (t TAI64) Marshal8() (ret [8]byte)
- func (t TAI64) MarshalBinary() ([]byte, error)
- func (t TAI64) String() string
- func (t TAI64) TAI64N() TAI64N
- func (t TAI64) TAI64NA() TAI64NA
- func (t *TAI64) UnmarshalBinary(data []byte) error
- type TAI64N
- func (t TAI64N) After(u TAI64N) bool
- func (t TAI64N) Before(u TAI64N) bool
- func (t TAI64N) GoTime() time.Time
- func (t TAI64N) Marshal() []byte
- func (t TAI64N) Marshal12() (ret [12]byte)
- func (t TAI64N) MarshalBinary() ([]byte, error)
- func (t TAI64N) String() string
- func (t TAI64N) TAI64() TAI64
- func (t TAI64N) TAI64NA() TAI64NA
- func (t *TAI64N) UnmarshalBinary(data []byte) error
- type TAI64NA
- func (t TAI64NA) After(u TAI64NA) bool
- func (t TAI64NA) Before(u TAI64NA) bool
- func (t TAI64NA) Marshal() []byte
- func (t TAI64NA) Marshal16() (ret [16]byte)
- func (t TAI64NA) MarshalBinary() ([]byte, error)
- func (t TAI64NA) String() string
- func (t TAI64NA) TAI64N() TAI64N
- func (t *TAI64NA) UnmarshalBinary(data []byte) error
Constants ¶
View Source
const ( TAI64Size = 8 TAI64NSize = 12 TAI64NASize = 16 )
View Source
const UnixEpoch = TAI64(tai64Offset + 10)
UnixEpoch as TAI64
Variables ¶
This section is empty.
Functions ¶
func TAIFromUTC ¶
TAIFromUTC applies leap seconds to seconds and returns the corresponding TAI time. unixSeconds is the number of seconds since the UNIX epoch The result IS NOT a TAI64
func UTCFromTAI ¶
UTCFromTAI removes leap seconds and returns the corresponding UTC time unixSeconds is the number of seconds since the UNIX epoch
Types ¶
type TAI64 ¶
type TAI64 uint64
func (TAI64) MarshalBinary ¶
func (*TAI64) UnmarshalBinary ¶
type TAI64N ¶
func FromGoTime ¶
FromGoTime returns a TAI64N from a time.Time The time will be converted to UTC and then into TAI, and then finally into a TAI64N
func (TAI64N) MarshalBinary ¶
func (*TAI64N) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.