Compare date and time

0

In C I have the time.h lib to manipulate date and time, already in Arduino the DateTime class that implements some methods.

I'm not finding, even if it's in the fingernail, how to compare date and time, for example:

if ( dt >= checkin )

where dt is the current date and time and checking a system date, how to compare?

    
asked by anonymous 07.12.2018 / 01:35

1 answer

0

You can convert the two dates to a number format with the mktime function and compare them.

    
08.12.2018 / 01:23