Real Time Clock (RTC) modules like the DS3231 chip (found on the ChronoDot and Seeeduino Stalker v2.3) keep track of the date and time for a datalogger circuit. The module can output the number of seconds since January 1, 2000 as an integer, which can be very handy for recording a time stamp with your sensor data. However, 1/1/2000 is not a common starting point for most epoch calculations. They usually use what most people call Unix Time, which is the number of seconds since 1/1/1970. So there can be issues if you’re trying to convert between DS3231 epoch time and Unix Time. The simplest method is to add 946684800 seconds (the number of seconds between 1/1/1970 and 1/1/2000) to the DS3231 time to get Unix Time.
So: DS3231Time + 946684800 = UnixTime
But there can also be an issue if you’re working with dates in MS Excel. It considers 1/1/1900 as the starting point and expresses date as the number of days (not seconds) since that starting point. So if you want to convert and Excel dates to UnixTime, here’s the forumla:
(ExcelDate – 25569) * 86400 = UnixTime
And as shown above: UnixTime – 946684800 = DS3231Time