Why service use UTC in db and log use local timezone

kaqiu pi thremes172 at gmail.com
Tue Aug 8 19:30:02 UTC 2023


Hello,

I have a openstack cluster. And the local time of server is different from
UTC.

I saw that the log date of openstack service is local time. But when I use
the command line to query the openstack service status, time zone is UTC.
Such as `opentack compute service list`, "Update At" is UTC.

In the email archive[1], I saw that there was a discussion earlier:
> i would guess it a deliberate design descisn to only store data
information in utc format and leave it to the clinets to convert to local
timezones if desired

But at that time it was just a guess, I would like to ask if this is the
meaning of the original design, why the service use UTC instead of local
time?

I would appreciate any kind of guidance or help.
Best wishes.


[1]
https://lists.openstack.org/pipermail/openstack-discuss/2021-June/022857.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20230809/5c58e337/attachment.htm>


More information about the openstack-discuss mailing list