Skip to content

Add lightweight timestamp-to-ISO conversion function #2034

Closed
@sffc

Description

@sffc

For time zone calculations, we need to store local datetimes (also known as civil datetimes or plain datetimes) for metazone cutoffs in the data provider.

If we store them as an ISO string, like "1988-04-03 04:01", we need either 12 or 16 bytes. It would be more efficient to store them as a "local timestamp", or the duration between the local datetime and 1970-01-01T00:00, most likely measured in minutes and stored in a u32. (Note: we should be very careful on using the term "local timestamp", because that can be really confusing terminology.)

I think this conversion function could go in icu_calendar.

Metadata

Metadata

Assignees

Labels

C-datetimeComponent: datetime, calendars, time zonesS-smallSize: One afternoon (small bug fix or enhancement)T-coreType: Required functionalitygood first issueGood for newcomers

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions