tzname(returns the value of tzinfo tzname(if no time zone is setnone is returned utcoffset(returns the value of tzinfo utcoffset(nonethe returned object is timedelta object if no time zone has been setnone is returned datetime objects datetime objects are used to represent dates and times together there are many possible ways to create datetime instancedatetime(yearmonthday [hour [minute [second [microsecond [tzinfo]]]]]creates new datetime object that combines all the features of date and time objects the arguments have the same meaning as arguments provided to date(and time(datetime combine(date,timea class method that creates datetime object by combining the contents of date objectdateand time objecttime datetime fromordinal(ordinala class method that creates datetime object given an ordinal day (integer number of days since datetime minthe time components are all set to and tzinfo is set to none datetime fromtimestamp(timestamp [tz] class method that creates datetime object from timestamp returned by the time time(function tz provides optional time zone information and is tzinfo instance datetime now([tz] class method that creates datetime object from the current local date and time tz provides optional time zone information and is an instance of tzinfo datetime strptime(datestringformata class method that creates datetime object by parsing the date string in datestring according to the date format in format the parsing is performed using the strptime(function in the time module datetime utcfromtimestamp(timestampa class method that creates datetime object from timestamp typically returned by time gmtime(datetime utcnow( class method that creates datetime object from the current utc date and time lib fl ff