The influence of leap year on time conversion

this is usually the case when epoch (expressed in microseconds) turns to adulthood.

year = epoch / 1000 / 1000 / 60 / 60 / 24 / 365

but leap years have 366 days, so isn"t it inaccurate to divide by 365?

I"m just going to give you an example. Does a leap year have an impact on which step of the time transition? is it inaccurate to convert epoch to a unit smaller than the day?

CPP
Jun.06,2022

Of course, there is a problem with this. I don't know where your "generally do this" conclusion comes from.
is not only a leap year, but also takes into account the time zone, daylight saving time, and so on. Obviously, this direct death writing practice is incorrect. Why not use the
time library and the various time functions provided by os? Why do you have to write such a "smart" algorithm?
the following is "normal" to me, isn't it?

-sharpinclude<stdio.h>
-sharpinclude<time.h>
int main()
{
    time_t ts = time(NULL);
    tm* time_obj = localtime(&ts);
    printf("%d", time_obj->tm_year + 1900);
}

A more accurate approximation of

solar year is 365.24 * 86400s

.

the "calendar / local time" stipulated by human beings has many complicated factors: https://github.com/kdeldycke/... 's own implementation is mostly problematic

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e96414-15c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e96414-15c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?