There is a struct tm *time variable, how neatly and simply to display in a human readable form how much time is left before this date from the date stored in another variable ( struct tm *stime )?

    1 answer 1

    If not far :) - then convert them to time_t calling mktime , subtract, and the difference in seconds divided by days, hours, minutes ...

    • Yeah, that's what my problem was, I was too lazy and tried not to share it myself, but through gmtime. Not far)) - Vіtalіy Karpenko