system

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTimezone

func GetTimezone() (zoneInfoDir, zone string, err error)

GetTimezone returns the current system timezone and its path after zoneInfoPath

func ReadTimezones

func ReadTimezones(zoneInfoDir string) (listZones []string, err error)

ReadTimezones returns a list of possible time zones from the system Possible arguments for zoneInfoDir:

"" (root dir)
"US"
"posix/America"

func SetTime

func SetTime(t time.Time) (err error)

SetTime sets the system time

func SetTimezone

func SetTimezone(zoneInfoDir, zone string) (err error)

SetTimezone sets the current system time zone

func UpdateTimeFromNetwork

func UpdateTimeFromNetwork() (err error)

UpdateTimeFromNetwork fetches time from ntp server and stores in system and RTC

Types

This section is empty.

Jump to

Keyboard shortcuts

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