Search code examples
python-3.xunix-timestamppython-datetime

grab UNIX timestamp down to the last second


How would I grab the exact Unix time in python3?

import time
t = (time.strftime("%d/%m/%Y"))

For example I can use the code above and plug that into a converter. But this does not work for what I need because there is no output to hours and seconds


Solution

  • Using Time.Time() you can grab the exact UNIX timestamp