def now():
"""Returns a string containing the current date and time.
This function is used internally by VideoCapture to generate the timestamp
with which a snapshot can optionally be marked.
"""
weekday = ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun')
#weekday = ('Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So')
#weekday = ('-', '-', '-', '-', '-', '-', '-')
y, m, d, hr, min, sec, wd, jd, dst = time.localtime(time.time())
return '%s:%s:%s %s %s.%s.%s' % (string.zfill(hr, 2), string.zfill(min, 2), string.zfill(sec, 2), weekday[wd], d, m, y)
评论列表
文章目录