Fixed an issue that current time can be illegal