How to Solve NameError: name 'gmtime' is not defined -- time

Solution: Import the 'gmtime' module

To Solve the error, add the following line to the top of your code.

from time import gmtime

 

For more information:
Python time gmtime