Skip to content

[GLib] Allow to create time and timestamp arrays with a time zone #39702

@esodan

Description

@esodan

Describe the enhancement requested

Current API to create a GArrowTimestamp, requires a GArrowTimestampDataType.

An GArrowTimestampDataType can be created but only is possible to define its time units; there isn't an API to create one adding a time zone as in PyArrow.

So a new garrow_timestamp_data_type_new_with_timezone() method is required using the following signature:

GArrowTimestampDataType *
garrow_timestamp_data_type_new_with_timezone (GArrowTimeUnit unit, GTimeZone* tz);

This should help GLib users to create timestamps with a time zone.

Above will require to add a method to get the current GTimeZone:

GTimeZone *
garrow_timestamp_get_timezone (GArrowTimestampArray *array);

Above API should be the added too, to GArrowTime32Array and GArrowTime64Array arrays, so is easy to know the time zone the time is representing.

Component(s)

GLib

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions