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 248 views
1 answer 150 views
1 answer 188 views
1 answer 219 views
5 answers 411 views
1 answer 177 views
1 answer 154 views
154 views asked Jun 10, 2020 by avibootz
...