utils.py
branchtls-sprint
changeset 1625 744f0cc8758f
parent 1616 b081fe3d5945
child 1626 399ac5294471
equal deleted inserted replaced
1616:b081fe3d5945 1625:744f0cc8758f
     9 import locale
     9 import locale
    10 from md5 import md5
    10 from md5 import md5
    11 from datetime import datetime, timedelta, date
    11 from datetime import datetime, timedelta, date
    12 from time import time
    12 from time import time
    13 from random import randint, seed
    13 from random import randint, seed
       
    14 from calendar import monthrange
    14 
    15 
    15 # initialize random seed from current time
    16 # initialize random seed from current time
    16 seed()
    17 seed()
    17 
       
    18 try:
    18 try:
    19     strptime = datetime.strptime
    19     strptime = datetime.strptime
    20 except AttributeError: # py < 2.5
    20 except AttributeError: # py < 2.5
    21     from time import strptime as time_strptime
    21     from time import strptime as time_strptime
    22     def strptime(value, format):
    22     def strptime(value, format):