datetime

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Epoch

func Epoch() time.Time

Epoch return fit epoch (31 Dec 1989 00:00:000 UTC) as time.Time

func ToLocalTime

func ToLocalTime(value any, tzOffsetHours int) time.Time

ToLocalTime returns time in local time zone by specifying the time zone offset hours (+7 for GMT+7).

func ToTime

func ToTime(value any) time.Time

ToTime return new time based on given v.

func ToUint32

func ToUint32(t time.Time) uint32

Convert t into uint32 fit representative time value.

func TzOffsetHours

func TzOffsetHours(localTime typedef.LocalDateTime, t typedef.DateTime) int

TzOffsetHours calculates time zone offset using LocalDateTime and DateTime.

formula ilustration: (activity.LocalTimestamp - activity.Timestamp) / 3600

Types

This section is empty.

Jump to

Keyboard shortcuts

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