Use the time module:
import time
epoch_time = int(time.time())
More Related Contents:
- How do I get the current time?
- How do I get the day of week given a date?
- What is the standard way to add N seconds to datetime.time in Python?
- Get current time in milliseconds in Python?
- In Python, how do you convert seconds since epoch to a `datetime` object?
- How to add delta to python datetime.time?
- How do I get the current time in milliseconds in Python?
- Splitting timestamp column into separate date and time columns
- How to get current time in python and break up into year, month, day, hour, minute?
- Python speed testing – Time Difference – milliseconds
- Difference between Python datetime vs time modules
- How to add/subtract time (hours, minutes, etc.) from a Pandas DataFrame.Index whos objects are of type datetime.time?
- Python: Figure out local timezone
- How to convert epoch time with nanoseconds to human-readable?
- Convert python datetime to epoch with strftime
- How to parse dates with -0400 timezone string in Python?
- Creating a range of dates in Python
- How do I calculate the date six months from the current date using the datetime Python module?
- Convert pandas timezone-aware DateTimeIndex to naive timestamp, but in certain timezone
- How do I get the UTC time of “midnight” for a given timezone?
- ISO time (ISO 8601) in Python
- High-precision clock in Python
- Generate a list of datetimes between an interval
- Convert String with month name to datetime
- Generate RFC 3339 timestamp in Python [duplicate]
- Datetime conversion – How to extract the inferred format?
- Parsing a date that can be in several formats in python
- Convert a column of timestamps into periods in pandas
- Python: Adding hours to pandas timestamp
- how to specify the datetime format in read_csv