Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By tele_player
#75184 time() and ctime() are normal Unix (linux, OS X, etc.) functions for working with time. 8266 isn’t Unix, but it’s very common to implement these in a way that’s familiar to Programmers. If you have a system with a real OS, use manual pages for details. Or just Google ‘man time’ or ‘man ctime’

configTime sets up the SNTP client. The source code (from Github) should make its use clear:

Code: Select allvoid configTime(int timezone, int daylightOffset_sec, const char* server1, const char* server2, const char* server3)
{
    sntp_stop();

    setServer(0, server1);
    setServer(1, server2);
    setServer(2, server3);

    sntp_set_timezone(timezone/3600);
    sntp_set_daylight(daylightOffset_sec);
    sntp_init();
}