Convert NTP time to integer

The variable type would be time_t, the base type is going to be dependent on the processor you are compiling for.

The time can be converted from a time_t to a tm struct using the gmtime() or localtime() functions, which breaks it out into hours, minutes, seconds, day, month, year, etc.

See the documentation for the standard C time.h

1 Like