How is it convenient to test time-based functions?

for example, the continuous check-in of the application, once a day, is currently thinking of writing a function to get the current time, the program gets the current time from this function, and arbitrarily modifies the returned value when testing later, and then modifies the server time, but it is very troublesome to verify it after it is online. I don"t know how you do it?

Mar.18,2021

We did check-in at that time, and it was really the time of the modified test server, and it was not easy to do it in other ways

.
Menu