Skip to content

Handle Linux systems with missing tzdb #128

Description

@apjanke

Following up on #125

When you do Tablicious time zone related stuff on a Linux box that's missing tzdb or has it installed somewhere besides /usr/share/zoneinfo, it raises an error about an invalid zoneid. Like this:

  >>>>> processing /usr/share/octave/packages/tablicious-0.4.2/@datetime/datetime.m
  ***** test datetime ('2011-03-07 12:34:56', 'TimeZone', 'America/New_York');
  !!!!! test failed
  Undefined TimeZone: America/New_York

Would be nice to have the error say "missing tzdb package" instead; it took us a while to figure out what was going on here. Maybe even fall back to the bundled tzdb, but think about that for a bit first.

TODO

  • Better error handling for missing tzdb.
    • Dynamic tzdb detect, which detects the whole db being missing, instead of treating it as a single missing zone file indicating an invalid zone id; details in error message.
  • Figure out how to build a tzdata-less Ubuntu VM or container for testing this.
  • Caching of parsed time zone files and tab, while we're in here.
  • Learn and run doctest on Tablicious

Metadata

Metadata

Assignees

Labels

chronoThe date/time stuffenhancementNew feature or request

Projects

Status
Low priority

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions