stat format %Y is seconds since epoch and works on CentOS/Debian too, so
check if we're on Linux and use that instead.