I’m pulling my hair out trying to get an imported (from a spreadsheet) datatime values from naive to aware. I have the below test loop and I am perplexed why the aware timezone is -00:01 rather than +01:00. I have use_tz = True and have set the local and current timezone to UTC.
for o in form.cleaned_data['file_data']:
tz = pytz.timezone('Europe/London')
aware_datetime = timezone.make_aware(o['start'], tz)
print(o['start'],aware_datetime)
Output:
2024-09-19 09:00:00 2024-09-19 09:00:00-00:01
2024-09-19 09:06:00 2024-09-19 09:06:00-00:01
2024-09-19 09:12:00 2024-09-19 09:12:00-00:01
2024-09-19 09:18:00 2024-09-19 09:18:00-00:01
2024-09-19 09:24:00 2024-09-19 09:24:00-00:01
2024-09-19 09:30:00 2024-09-19 09:30:00-00:01
What am I doing wrong ?
Thank you