-4

My desired output is something like this in ISO 8601 format: Is there a way I just manually written it like that? Thank you!

2012-11-03T18:15:00-08:00
2012-11-03T18:30:00-08:00
2012-11-03T18:45:00-08:00
2012-11-03T19:00:00-08:00
2012-11-03T19:15:00-08:00
2012-11-03T19:30:00-08:00
2012-11-03T19:45:00-08:00
2012-11-03T20:00:00-08:00
2012-11-03T20:15:00-08:00
2012-11-03T20:30:00-08:00
2012-11-03T20:45:00-08:00
2012-11-03T21:00:00-08:00
2012-11-03T21:15:00-08:00
2012-11-03T21:30:00-08:00
2012-11-03T21:45:00-08:00
2012-11-03T22:00:00-07:00

1 Answers1

2
import time
print(time.strftime("%Y-%m-%dT%H:%M:%S%z"))
MegaIng
  • 7,361
  • 1
  • 22
  • 35