NTP Clock.ino

To request date and time, initialize time client with address of NTP servers. For better accuracy choose the address of NTP servers which are close to your geographical area. Here we use “pool.ntp.org” which gives servers from worldwide. If you wish to choose servers from Asia you can use “asia.pool.ntp.org”. timeClient also takes UTC time offset in milliseconds of your timezone. For instance, UTC offset for India is +5:30 so we convert this offset in milliseconds which is equal to 5*60*60+30*60 = 19800.

Area. UTC time offset(hours and minutes). UTC time offset(seconds)

INDIA +5:30 19800

LONDON 0:00. 0

NEW YORK -5:00 -18000

ino - 2.61 kB - 12/11/2019 at 04:42

Download