How to get the current GMT time in Unix format in Python

Displaying the current GMT time in Unix format returns the number of seconds since January 1, 1970 at midnight.

Solution for How to get the current GMT time in Unix format in Python : You can use time.time() to get the current GMT time in Unix format Use time.time() to return the current time in Unix format.

Cast the result to an integer to represent whole seconds.

int_output = int(time.time())


how-to-get-the-current-gmt-time-in-unix-format-in-python