The value of the fetched data changes when the time_zone is set.
Hello,
Please can you tell me why the value of the actual data changes when the time_zone='UTC' in get_data()? Or I do not understand the purpose of the parameter? Because this does not happened when output_timezone is rather used instead of time_zone.
Can you please explain this to me?
Below is the example:
This is first code with no time_zone parameter (default = CET):
session = wapi.Session(config_file=my_config_file)
start_date = pd.Timestamp('2020-6-1 00:00')
end_date = pd.Timestamp('2020-6-8 00:00')
curve_name = 'tt de con °c cet min15 s'
curve = session.get_curve(name=curve_name)
ts = curve.get_data(
data_from=start_date,
data_to=end_date,
)
df_cet = ts.to_pandas().to_frame(name='value')
df_cet output:
Additional info about the dataframe:

This is the second code with time_zone set to 'UTC'
session = wapi.Session(config_file=my_config_file)
start_date = pd.Timestamp('2020-6-1 00:00')
end_date = pd.Timestamp('2020-6-8 00:00')
curve_name = 'tt de con °c cet min15 s'
curve = session.get_curve(name=curve_name)
ts = curve.get_data(
data_from=start_date,
data_to=end_date,
time_zone='UTC'
)
df_utc = ts.to_pandas().to_frame()
df_utc output:
Additional info about the dataframe:

I don't think we could say the values have changed just by looking at your printed outputs, because those two reflect different set of timestamps.
Say for example first row of first output, 2020-06-01 00:00:00+02:00 is not the same at 2020-06-01 00:00:00+00:00, as in the fist row of the second output. Instead in UTC, it would be equal to 2020-05-31 22:00:00+00:00, whose value was not showed there.
In fact, there was no overlapping in timestamp in the two truncated results you have provided. You might want to print a more complete set of values, and keep in mind they are two different timezones, so 8am in UTC+2 would be 6am in UTC.

