I'm converting a datetime into an other timezone (from Europe/Paris to America/Guadeloupe). But result is not what i expect:
tzinfo = pytz.timezone('Europe/Paris')
datetime_with_timezone = datetime.datetime(
2000, 1, 1, 0, 0, 0, tzinfo=tzinfo
new_tzinfo = pytz.timezone('America/Guadeloupe')
This seems to be a known issue, as according to the pytz documentation:
Unfortunately using the tzinfo argument of the standard datetime constructors ‘’does not work’’ with pytz for many timezones.
The documentation provides further advice that
The preferred way of dealing with times is to always work in UTC, converting to localtime only when generating output to be read by humans.