I need to assign to a variable the current datetime string in isoformat like the following:
2018-09-27T16:19:16+02:00
What I'm doing is:
import datetime
....
print(datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc, microsecond=0).isoformat())
But this is going to print the string with utc tz:
2018-09-28T07:05:35+00:00
Not clear yet to me what's the clean way I should change tzinfo param to set wanted tz to UTC+02:00 ?
Thanks