Skip to content

Datetime items

John Tourtellott requested to merge john.tourtellott/smtk:datetime-items into master

This is the first of 3 MR's for adding an attribute item to represent date & time. This MR introduces several classes:

  • DateTimeItem: subclass of ValueItemTemplate, to represent one or more DateTimeZonePair values
  • DateTimeZonePair: a light wrapper for DateTime and TimeZone classes
  • DateTime: a wrapper for boost::posix_time::ptime class, which represents a discrete point on an absolute time scale
  • TimeZone: a wrapper for boost::local_time::time_zone_ptr, which represents a time zone for reading/writing DateTime values. The branch includes the boost time zone "database" as a header file (timezonespec.h) to allow setting time zone by a region name (for example, "America/New_York"). Time zone can also be specified as UTC, or by posix string, or left unset.
  • DateTimeItemDefinition: subclass of ValueItemDefinitionTemplate that specifies DateTimeItem entities.

Also:

  • The new classes will NOT include shiboken-python bindings. Pybind11 bindings will be added in a separate MR.
  • The attribute file version was incremented from 2 to 3 to support the new functionality. (Additional features may be added to V3 in the future.)

Future MR's will be submitted for python bindings and UI components.

Merge request reports