MCPcopy Create free account
hub / github.com/ActiveState/code / ToUnixTime

Method ToUnixTime

recipes/Python/117215_A_Date_module/recipe-117215.py:269–272  ·  view source on GitHub ↗

Convert a date into Unix time (seconds since the epoch) corresponding to the same day with the midnight hour.

(self)

Source from the content-addressed store, hash-verified

267 return tuple(ret)
268
269 def ToUnixTime(self):
270 """Convert a date into Unix time (seconds since the epoch) corresponding
271 to the same day with the midnight hour."""
272 return time.mktime(self.ToTimeTuple())
273
274 def ToCOMTime(self):
275 """Convert a date into COM format."""

Callers 1

ToCOMTimeMethod · 0.95

Calls 1

ToTimeTupleMethod · 0.95

Tested by

no test coverage detected