Ticket #12261: strftime_filling_with_zeros_years_below_1000.diff

File strftime_filling_with_zeros_years_below_1000.diff, 400 bytes (added by Javier de la Rosa, 15 years ago)

strftime filling with zeros in years below 1000

  • utils/datetime_safe.py

     
    8383            sites.append(site)
    8484
    8585    s = s1
    86     syear = "%4d" % (dt.year,)
     86    syear = "%04d" % (dt.year,)
    8787    for site in sites:
    8888        s = s[:site] + syear + s[site+4:]
    8989    return s
Back to Top