Timezone handling changes

Please don't use this unless instructed for now

Anki 2.1.20beta3 and AnkiMobile 2.0.56beta2 contain an optional change to the way Anki calculates the elapsed number of days. This change addresses some corner cases where timezone changes (including daylight savings) could cause Anki to move back or forward a day, and addresses cards being unburied / daily counts being reset for some users when syncing with AnkiWeb.

For most users, the new calculation should produce the same number of elapsed days as the old calculation. But for some users, enabling this code may move Anki forward or back by one day.

Please make sure you are running the above-mentioned versions prior to enabling the new code. If any of your Anki clients have not been updated yet, it may cause problems when syncing. AnkiDroid does not currently support these changes.

This change only applies to the 2.1 scheduler. If you are using the regular scheduler, you can not use this.

To enable the new calculation, please make sure your devices are in sync, then open the debug console and run the following:

mw.col.reset()
old = mw.col.sched.today
mw.col.sched.set_creation_offset()
mw.col.reset()
new = mw.col.sched.today
print(f"elapsed days was {old}, is now {new}")

When you run the command, the last line will look like elapsed days was 2684, is now 2684. If the numbers match, the day has not changed.

Please close the window and sync, then sync your other devices to complete the process.

If you notice any problems with the new handling, please let us know.