How to set specific time to time class in Python

1 Answer

0 votes
import datetime
 
tm = datetime.time(9, 4, 30)      
print(tm)      

print('hour:', tm.hour)      
print('minute:', tm.minute)      
print('second:', tm.second)      
print('microsecond:', tm.microsecond)      
print('tzinfo:', tm.tzinfo) 



'''
run:

09:04:30
hour: 9
minute: 4
second: 30
microsecond: 0
tzinfo: None

'''

 



answered Jun 5, 2019 by avibootz

Related questions

1 answer 239 views
1 answer 145 views
1 answer 181 views
1 answer 170 views
1 answer 139 views
139 views asked Jun 10, 2020 by avibootz
1 answer 195 views
1 answer 178 views
...