Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/timeutils: Fix problem with dates prior to Mar 1, 2000 #1270

Closed
wants to merge 1 commit into from

Commits on May 20, 2015

  1. lib: Fix some issues in timeutils

    In particular, dates prior to Mar 1, 2000 are screwed up.
    
    The easiest way to see this is to do:
    
    >>> import time
    >>> time.localtime(0)
    (2000, 1, 1, 0, 0, 0, 5, 1)
    >>> time.localtime(1)
    (2000, 1, 2, 233, 197, 197, 6, 2)
    
    With this patch, we instead get:
    >>> import time
    >>> time.localtime(1)
    (2000, 1, 1, 0, 0, 1, 5, 1)
    
    Doh - In C % is NOT a modulo operator, it's a remainder operator.
    dhylands committed May 20, 2015
    Configuration menu
    Copy the full SHA
    14c28a3 View commit details
    Browse the repository at this point in the history