A strange problem due to a change in the system clock

I am coding an application based on dates and debugging goals related to leap years. I changed my system clock back and forth between some dates. After setting my system date to February 13, 2012 and vice versa, I cannot interact with Core Data objects.

I tried several times to uninstall the application (from the simulator), build and rebuild, but nothing works. I cannot add new objects to the database (and could not get them when I still had a full database).

Any other changes that I make that are not related to Core Data seem to be correct. I also did a reset for the simulator, but this did not solve the problem.

Any idea what's wrong?

+3
source share
2 answers

Firstly, I have a general recommendation regarding watch testing:

Use a virtual machine when testing for different clock settings. That way, when you mess up the system, you won’t twist your actual development system. You can easily return the VM back to a known working state.

Having said that, your immediate problem may be that some file was created with a timestamp in the future, which leads to something else not happening due to an incorrect timestamp. If the problem is really a file, you can find your drive for a file dated in the future. If the timestamp is instead stored somewhere somewhere, then you can reset it.

+2
source

. - - .

, , , . , , !

0

Source: https://habr.com/ru/post/1791882/


All Articles