change time to unsigned, prevent overflow