Documentation

Overview

Package ntp syncs system time with NTP server.

Index

Constants

This section is empty.

Variables

var (
	DefaultNTP    = "/usr/sbin/ntpdate"
	DefaultServer = "time.google.com"
)

Functions

func DefaultSync

func DefaultSync() (string, error)

DefaultSync syncs system time with NTP server.

func Sync

func Sync(ntpPath string, server string) (string, error)

Sync syncs system time with NTP server.

sudo service ntp stop
sudo ntpdate time.google.com
sudo service ntp start

Types

This section is empty.

Source Files