[openstack-dev] [ceilometer] database timestamps timezones

Sandy Walsh sandy.walsh at RACKSPACE.COM
Fri Nov 2 13:26:02 UTC 2012


I just did a major refactoring in StackTach to convert datetime usage to python's Decimal library (all UTC). 
Much easier to send over JSON, store in a database and pass as a GET parameter.

https://github.com/rackspace/stacktach/blob/master/stacktach/datetime_to_decimal.py

Something to consider. 

-S
________________________________________
From: Nick Barcet [nick.barcet at canonical.com]
Sent: Friday, November 02, 2012 9:44 AM
To: OpenStack Development Mailing List
Subject: Re: [openstack-dev] [ceilometer] database timestamps timezones

On 11/02/2012 04:00 AM, John Tran wrote:
> Looking over https://bugs.launchpad.net/ceilometer/+bug/1048647, we'd
> like some feedback on timezone aware datetimes for the timestamp
> fields (in Meters and Resources tables).  From what I understand, some
> backends do not support timezone in timestamp type fields , such as
> MongoDB and Postgres.  I think the way Nova handles it is that it
> expects all timestamps in the database is expected to be UTC.

+100 on normalizing on UTC. Makes everyone's life so much easier.

--
Nick Barcet <nick.barcet at canonical.com>
aka: nijaba, nicolas





More information about the OpenStack-dev mailing list