How does the timezone handling work?

Let’s say that I am on a journey and I review my cards in several timezones within the span of 24 hours. Will the elapsed time for each card be calculated correctly (as if I always did all of my cards in the same timezone)?

Further, how does Anki actually handle the timezone changes? Does it store all the times & dates in the same timezone (most probably UTC)? Or does it use some other way?

Also, how does the “New Timezone Handling” (which has been available since long) differ from the older approach?

Just to clarify, my main query is whether Anki can efficiently handle the timezone changes or not.

For example, let’s say that a learning card was to be shown 3 hours later. Then, my timezone changes such that my device time decreases by 2 hours. Now, will this card be shown 3 hours later or 5 hours later?

The questions related to the mechanism of timezone handling were simply a result of my belief that having a basic understanding of everything is desirable because it can help one resolve many of their doubts without needing to ask too many questions.

Dates are stored in UTC and relative to the currently-active timezone, so when your timezone changes, due dates/daily cutoffs may shift forward or back in line with the timezone change.

The creation date of the collection is used to count how many days have elapsed. The new timezone handling adjusts this date based on the local timezone; the old one did not, which caused problems when the timezone changed.

Sorry, but the answer doesn’t clear the doubt.

Let me ask the following two specific questions to clarify things.

  1. Let’s say that I answered a card on 19th July (in current timezone) and it was scheduled to be shown the next day. Then, my timezone changed so that the date changed to 20th July (and the time beyond the “next day starts at” setting). So, will this card be shown on 20th July (in the new timezone) or on 21st July?
    Ideally, it should be shown on 21st July if the card was answered on 20th July (in the new timezone) but on 20th July if the card was answered on 19th July (in the new timezone). Does it actually work like this?
    In other words, does it recalculate the due date based on the review date (in the new timezone) and the interval or does it just store the due date and show the card when the stored due date is attained in the current timezone?
  2. Let’s say that a learning card was scheduled to be shown 3 hours later. Then, my timezone changes such that my device time decreases by 2 hours. Now, will this card be shown 3 hours later or 5 hours later? It is similar to the above scenario but slightly different because the interval is more important than the date here.

You should be able to test this yourself fairly easily, by exporting your collection into a test profile, and then altering the timezone and/or clock after Anki is already open.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.