##// END OF EJS Templates
util: add an optional timestamp parameter to makedate...
Bryan O'Sullivan -
r19287:8b04e134 default
parent child Browse files
Show More
@@ -997,9 +997,10 b' def filechunkiter(f, size=65536, limit=N'
997 limit -= len(s)
997 limit -= len(s)
998 yield s
998 yield s
999
999
1000 def makedate():
1000 def makedate(timestamp=None):
1001 '''Return the current time as a (unixtime, offset) tuple based off
1001 '''Return a unix timestamp (or the current time) as a (unixtime,
1002 the local timezone.'''
1002 offset) tuple based off the local timezone.'''
1003 if timestamp is None:
1003 timestamp = time.time()
1004 timestamp = time.time()
1004 if timestamp < 0:
1005 if timestamp < 0:
1005 hint = _("check your clock")
1006 hint = _("check your clock")
General Comments 0
You need to be logged in to leave comments. Login now