[openstack-dev] [ceilometer] database timestamps timezones

Eoghan Glynn eglynn at redhat.com
Fri Nov 2 15:57:57 UTC 2012



> > 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.
> 
> Postgres actually has separate types for timestamp without time zone
> and
> timestamp with time zone.
> 
> But I think it makes a lot more sense to just use UTC timestamps
> everywhere, rather than using timezone-aware timestamps which will
> involve more database-specific code.  If you care about the user's
> timezone, you can put it in a separate column.

Totally agree about standardizing on UTC ... having lived with
systems using TZ-specific timestamps, its a never-ending saga of
confusion & pain.

Cheers,
Eoghan



More information about the OpenStack-dev mailing list