This is a D port of tzf-rs tool. It allows to get the time zone based on the coord data (longitude, latitude).
This is going to be normal dub package.
To get the CLI tool:
dub fetch tzf_d
To build it locally (require D compiler) you can clone the repo and use command:
dub build -b=release
To get the result you need to provide (longitude, latitude) as shown below:
tzf_d --lng=100.123 --lat=-42.123
Because of regression in D compiler, currently code is working only with dmd 2.103/ ldc 1.33.
├── Readme.md
├── data
│ ├── combined-with-oceans.reduce.compress.pb
│ ├── combined-with-oceans.reduce.pb
│ └── combined-with-oceans.reduce.preindex.pb
├── dub.json
└── source
├── app.d
├── geomedry.d
├── lib.d
├── package.d
├── pb
│ └── tzinfo.d
└── tzf_rel.d
- data: has data files, that will be used to match time zone
- source/app.d: CLI code
- source/geomedry.d: library with geometry primitives (could be used separatly)
- source/lib.d: main library code with internal classes and logic
- source/pb/tzinfo.d: structure description generated by protoc
- source/tzf_rel.d: separate file to load data
- Make code more iDiomatic
- Fix dub configuration, to make code available as both CLI and D library
- Improve performance
- Reduce copy of the data (adding ref and other attributes)
- struct vs class
- make protobuf generation automatically in dub
- consider code that download only required data, instead of storing all data in the package (~18Mb)
- Improve CLI functionality: add help and proper args parsing (maybe with commandr)
- cudos to original repo tzf-rs
- geomeDry is a D port of Rust's port geometry-rs of Go's package geometry.
- data file taken from tzf-rel repo.
- original data source is located in the repo timezone-boundary-builder
This project is licensed under the MIT license. The data is licensed under the ODbL license, same as evansiroky/timezone-boundary-builder