mercurial/util.py
changeset 1958 f92cf4a8cedd
parent 1956 16750010813d
parent 1953 379ab45b91b7
child 1976 df8416346bb7
equal deleted inserted replaced
1957:295010327271 1958:f92cf4a8cedd
   740         tz = time.altzone
   740         tz = time.altzone
   741     else:
   741     else:
   742         tz = time.timezone
   742         tz = time.timezone
   743     return time.mktime(lt), tz
   743     return time.mktime(lt), tz
   744 
   744 
   745 def datestr(date=None, format='%c'):
   745 def datestr(date=None, format='%a %b %d %H:%M:%S %Y'):
   746     """represent a (unixtime, offset) tuple as a localized time.
   746     """represent a (unixtime, offset) tuple as a localized time.
   747     unixtime is seconds since the epoch, and offset is the time zone's
   747     unixtime is seconds since the epoch, and offset is the time zone's
   748     number of seconds away from UTC."""
   748     number of seconds away from UTC."""
   749     t, tz = date or makedate()
   749     t, tz = date or makedate()
   750     return ("%s %+03d%02d" %
   750     return ("%s %+03d%02d" %