The current timeutils.isotime function cannot make the tz added in the API, 'created_at' or 'created‘, because the 'UTC' is set in the isotime function.
"
tz = at.tzinfo.tzname(None) if at.tzinfo else 'UTC'
"
No tzname is specified, so the 'UTC' is the default tz.
Obviously, 'UTC' can make the timezone consistent within openstack. But, if I understand you correctly, you might expect that user-specified local timezone should be displayed to users in the APIs. If so, I agree with you. The timeutils module should provide an optional layer to convert the UTC into user local timezone according to the time_zone info users specified in the conf file. So far, the TIME_ZONE seems to be only set in the horizon or openstack-dashboard/local_settings.
Hi Cory,
The current timeutils.isotime function cannot make the tz added in the API, 'created_at' or 'created‘, because the 'UTC' is set in the isotime function. tzname( None) if at.tzinfo else 'UTC'
"
tz = at.tzinfo.
"
No tzname is specified, so the 'UTC' is the default tz.
Obviously, 'UTC' can make the timezone consistent within openstack. But, if I understand you correctly, you might expect that user-specified local timezone should be displayed to users in the APIs. If so, I agree with you. The timeutils module should provide an optional layer to convert the UTC into user local timezone according to the time_zone info users specified in the conf file. So far, the TIME_ZONE seems to be only set in the horizon or openstack- dashboard/ local_settings.
Thanks,
Strony