0 works

Get the current time in Python


dashboard+ Project

Posted by @bravocoder #python

Code snippet:

>>> from time import gmtime, strftime
>>> strftime("%Y-%m-%d %H:%M:%S", gmtime())
'2009-01-05 22:14:39'
content_copyCopy to Clipboard

Code snippet source:

https://stackoverflow.com/questions/415511/how-to-get-the-current-time-in-python

>> Browse more code snippets

more_vert