Retrieve sketch build date and time from bin file

DATE et TIME are replaced automatically by the preprocessor by the date and time at compile time. If you uploaded right after, it's pretty close to the upload time. This is used for setting up the clock in RTC operations, you'll often see something like

  if (! rtc.initialized()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
   }

So,your code can know when it was compiled and it could ping an update server providing that info and server side you can compare to the file creation date of the latest binary in your repository to decide if you need an update