Python and bash snippets
import datetimeimport timeimport calendar#Returns stringd = datetime.datetime.now()d.strftime('%s')#another solution returns intcalendar.timegm(d.timetuple())#Yet another solution, returns floattime.mktime(d.timetuple())
No comments:
Post a Comment