Parse hw_clock output in Python

Viewed 301

The output of

/sbin/hwclock --show --utc

looks like

2017-06-01 16:04:47.029482+1:00

How to parse this string into a datetime object in Python?

4 Answers
Related