user@machine:~$ date Tue Jan 12 09:22:56 UTC 2021
import calendar import datetime date = datetime.datetime.utcnow() utc_time = calendar.timegm(date.utctimetuple()) print(utc_time)
$ date +%s ## gives UNIX timestamp at command line