keep timezone "CET" from convert into "CEST" in python

1.6k views Asked by At

If I use the following command to localize my timestamp to "CET":

pd.Timestamp('2011-11-06 11:00:00').tz_localize('CET')

output: Timestamp('2011-11-06 11:00:00+0100', tz='CET')

if I use :

pd.Timestamp('2011-06-06 11:00:00').tz_localize('CET')

output: Timestamp('2011-06-06 11:00:00+0200', tz='CET')

So obviously it automatically convert into "CEST" in summer, am I right? what if I would like to keep my timestamp in "CET" through out the whole year (keep it UTC +1:00 all the time), what should I do? Thank you very much!

Updated:

the following seems working:

pd.Timestamp('2011-06-06 11:00:00').tz_localize(tz=pytz.FixedOffset(60))

output:Timestamp('2011-06-06 11:00:00+0100', tz='pytz.FixedOffset(60)')

any other suggestions?

0

There are 0 answers