Datetime

Higher precision then time maybe

GETTING NOW

from datetime import datetime

#Create datetime objects
now = datetime.now()
today = now.date()
moment = now.time() 

Printing

#Print them
now.isoformat() #'2023-03-30T23:36:52.926931'
now.strftime('We are the %d, %b %Y')

Parsing

POSIX/UTC using a local time zone

from datetime import datetime

datetime.fromisoformat("2011-11-04T00:05:23Z")
datetime.fromtimestamp(1553236529) #POSIX/UTC local
datetime.utcfromtimestamp(1553236529) #UTC local

Strptime lets you parse arbitrary formats: see here for all the meanings

Delta

Date

Timer

Sleep

Time Elapsed

Last updated