Fix conversion to use seconds instead of milliseconds