NTP

Obtain time from a network server

Init ntptime with host and timezone Set the NTP server and timezone

Get timestamp Obtain Unix timestamp

Get date format with - Get the date, display format with separator -

Get time format with - Get the time, display format with separator -

Get date format with - and time format with : Display date and time, date format with separator -, time format with separator :

Get year Obtain year

Get month Obtain month

Get day Obtain day

Get weekday Obtain weekday

Get hour Obtain hour

Get minute Obtain minute

Get second Obtain second

Usage Instructions

Display Unix timestamp and current date and time (Note: when the program downloads to run offline, add a WiFi connection program before the NTP initialization to connect the device to the network.)

On This Page