equal
deleted
inserted
replaced
608 while len(s) > 0: |
608 while len(s) > 0: |
609 yield s |
609 yield s |
610 s = f.read(size) |
610 s = f.read(size) |
611 |
611 |
612 def makedate(): |
612 def makedate(): |
613 t = time.time() |
613 lt = time.localtime() |
614 if time.daylight: tz = time.altzone |
614 if lt[8] == 1 and time.daylight: |
615 else: tz = time.timezone |
615 tz = time.altzone |
616 return t, tz |
616 else: |
|
617 tz = time.timezone |
|
618 return time.mktime(lt), tz |
617 |
619 |
618 def datestr(date=None, format='%c'): |
620 def datestr(date=None, format='%c'): |
619 """represent a (unixtime, offset) tuple as a localized time. |
621 """represent a (unixtime, offset) tuple as a localized time. |
620 unixtime is seconds since the epoch, and offset is the time zone's |
622 unixtime is seconds since the epoch, and offset is the time zone's |
621 number of seconds away from UTC.""" |
623 number of seconds away from UTC.""" |