Hi,
You need to check if 'timestamp' >=next_rep, with timestamp essentially the current time in unix format, but with some small changes to take into account timezones, etc.
If you want the nitty gritty, here is the Python function that calculates this timestamp:
def adjusted_now(self, now=None):
"""Timezone information and 'day_starts_at' will only become relevant
when the queue is built, not at schedule time, to allow for
moving to a different timezone after a card has been scheduled.
Cards are due when 'adjusted_now >= next_rep', and this function
makes sure that happens at h:00 local time (with h being
'day_starts_at').
"""
if now == None:
now = time.time()
# The larger 'day_starts_at', the later the card should become due,
# i.e. larger than 'next_card', so the more 'now' should be decreased.
now -= self.config()["day_starts_at"] * HOUR
# 'altzone' or 'timezone' contains the offset in seconds west of UTC.
# This number is positive for the US, where a card should become
# due later than in Europe, so 'now' should be decreased by this
# offset.
# As for when to use 'altzone' instead of 'timezone' if daylight
# savings time is active, this is a matter of big confusion
# among the Python developers themselves:
#
http://bugs.python.org/issue7229
if time.localtime(now).tm_isdst and time.daylight:
now -= time.altzone
else:
now -= time.timezone
return int(now)
Cheers,
Peter
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
mnemosyne-proj-u...@googlegroups.com.
> To post to this group, send email to mnemosyne-proj-
>
us...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/mnemosyne-proj-users/7190d982-3fc8-
> 4578-ae63-262c68fd85db%
40googlegroups.com
> <
https://groups.google.com/d/msgid/mnemosyne-proj-users/7190d982-
> 3fc8-4578-ae63-
> 262c68fd85db%
40googlegroups.com?utm_medium=email&utm_source=foo
> ter> .
> For more options, visit
https://groups.google.com/d/optout.