tzf2 0.0.1-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b528a8d7494c816af750b90bf028f16ccbd9684061dafa87501311773a25ac1a
4
+ data.tar.gz: dec6ac41bbacde229df23ca768e31736fc8e75a18880fdffa236807ca9494c7b
5
+ SHA512:
6
+ metadata.gz: 2b9703515edc4442b598c5c7497259daf01f9c1c1288cc32a5ff66da80e56361f77848aa4eab907779848d5e155292e1de7979ecfb7f3164088de96f0c962eea
7
+ data.tar.gz: b7c9d5cc4d8e76f3367bfadf169806c95c6cfc6a1ca8df5071116e3c4f8ad90faa107fd82bdd7162f0dc6b59269b47ed548fa91df502bab7bc4b7b9fd1a74fa8
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## 0.0.1
4
+
5
+ First release. Wraps tzf-rs 2.0.0 with tzf-dist `2026c` ocean-inclusive data.
6
+
7
+ Public API:
8
+
9
+ - `TZF.tz_name(latitude, longitude)`
10
+ - `TZF.tz_names(latitude, longitude)`
11
+ - `TZF.data_version`
12
+ - `TZF.engine_version`
13
+
14
+ In-range points with no covering polygon raise `TZF::UncoveredCoordinateError`. The gem does not invent a fallback zone.
15
+
16
+ Precompiled native gems ship for `x86_64-linux`, `aarch64-linux`, `x86_64-darwin`, and `arm64-darwin`. Other platforms compile from source.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Joseph Lozano
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE_DATA ADDED
@@ -0,0 +1,539 @@
1
+ ## ODC Open Database License (ODbL)
2
+
3
+ ### Preamble
4
+
5
+ The Open Database License (ODbL) is a license agreement intended to
6
+ allow users to freely share, modify, and use this Database while
7
+ maintaining this same freedom for others. Many databases are covered by
8
+ copyright, and therefore this document licenses these rights. Some
9
+ jurisdictions, mainly in the European Union, have specific rights that
10
+ cover databases, and so the ODbL addresses these rights, too. Finally,
11
+ the ODbL is also an agreement in contract for users of this Database to
12
+ act in certain ways in return for accessing this Database.
13
+
14
+ Databases can contain a wide variety of types of content (images,
15
+ audiovisual material, and sounds all in the same database, for example),
16
+ and so the ODbL only governs the rights over the Database, and not the
17
+ contents of the Database individually. Licensors should use the ODbL
18
+ together with another license for the contents, if the contents have a
19
+ single set of rights that uniformly covers all of the contents. If the
20
+ contents have multiple sets of different rights, Licensors should
21
+ describe what rights govern what contents together in the individual
22
+ record or in some other way that clarifies what rights apply.
23
+
24
+ Sometimes the contents of a database, or the database itself, can be
25
+ covered by other rights not addressed here (such as private contracts,
26
+ trade mark over the name, or privacy rights / data protection rights
27
+ over information in the contents), and so you are advised that you may
28
+ have to consult other documents or clear other rights before doing
29
+ activities not covered by this License.
30
+
31
+ ------
32
+
33
+ The Licensor (as defined below)
34
+
35
+ and
36
+
37
+ You (as defined below)
38
+
39
+ agree as follows:
40
+
41
+ ### 1.0 Definitions of Capitalised Words
42
+
43
+ "Collective Database" - Means this Database in unmodified form as part
44
+ of a collection of independent databases in themselves that together are
45
+ assembled into a collective whole. A work that constitutes a Collective
46
+ Database will not be considered a Derivative Database.
47
+
48
+ "Convey" - As a verb, means Using the Database, a Derivative Database,
49
+ or the Database as part of a Collective Database in any way that enables
50
+ a Person to make or receive copies of the Database or a Derivative
51
+ Database. Conveying does not include interaction with a user through a
52
+ computer network, or creating and Using a Produced Work, where no
53
+ transfer of a copy of the Database or a Derivative Database occurs.
54
+ "Contents" - The contents of this Database, which includes the
55
+ information, independent works, or other material collected into the
56
+ Database. For example, the contents of the Database could be factual
57
+ data or works such as images, audiovisual material, text, or sounds.
58
+
59
+ "Database" - A collection of material (the Contents) arranged in a
60
+ systematic or methodical way and individually accessible by electronic
61
+ or other means offered under the terms of this License.
62
+
63
+ "Database Directive" - Means Directive 96/9/EC of the European
64
+ Parliament and of the Council of 11 March 1996 on the legal protection
65
+ of databases, as amended or succeeded.
66
+
67
+ "Database Right" - Means rights resulting from the Chapter III ("sui
68
+ generis") rights in the Database Directive (as amended and as transposed
69
+ by member states), which includes the Extraction and Re-utilisation of
70
+ the whole or a Substantial part of the Contents, as well as any similar
71
+ rights available in the relevant jurisdiction under Section 10.4.
72
+
73
+ "Derivative Database" - Means a database based upon the Database, and
74
+ includes any translation, adaptation, arrangement, modification, or any
75
+ other alteration of the Database or of a Substantial part of the
76
+ Contents. This includes, but is not limited to, Extracting or
77
+ Re-utilising the whole or a Substantial part of the Contents in a new
78
+ Database.
79
+
80
+ "Extraction" - Means the permanent or temporary transfer of all or a
81
+ Substantial part of the Contents to another medium by any means or in
82
+ any form.
83
+
84
+ "License" - Means this license agreement and is both a license of rights
85
+ such as copyright and Database Rights and an agreement in contract.
86
+
87
+ "Licensor" - Means the Person that offers the Database under the terms
88
+ of this License.
89
+
90
+ "Person" - Means a natural or legal person or a body of persons
91
+ corporate or incorporate.
92
+
93
+ "Produced Work" - a work (such as an image, audiovisual material, text,
94
+ or sounds) resulting from using the whole or a Substantial part of the
95
+ Contents (via a search or other query) from this Database, a Derivative
96
+ Database, or this Database as part of a Collective Database.
97
+
98
+ "Publicly" - means to Persons other than You or under Your control by
99
+ either more than 50% ownership or by the power to direct their
100
+ activities (such as contracting with an independent consultant).
101
+
102
+ "Re-utilisation" - means any form of making available to the public all
103
+ or a Substantial part of the Contents by the distribution of copies, by
104
+ renting, by online or other forms of transmission.
105
+
106
+ "Substantial" - Means substantial in terms of quantity or quality or a
107
+ combination of both. The repeated and systematic Extraction or
108
+ Re-utilisation of insubstantial parts of the Contents may amount to the
109
+ Extraction or Re-utilisation of a Substantial part of the Contents.
110
+
111
+ "Use" - As a verb, means doing any act that is restricted by copyright
112
+ or Database Rights whether in the original medium or any other; and
113
+ includes without limitation distributing, copying, publicly performing,
114
+ publicly displaying, and preparing derivative works of the Database, as
115
+ well as modifying the Database as may be technically necessary to use it
116
+ in a different mode or format.
117
+
118
+ "You" - Means a Person exercising rights under this License who has not
119
+ previously violated the terms of this License with respect to the
120
+ Database, or who has received express permission from the Licensor to
121
+ exercise rights under this License despite a previous violation.
122
+
123
+ Words in the singular include the plural and vice versa.
124
+
125
+ ### 2.0 What this License covers
126
+
127
+ 2.1. Legal effect of this document. This License is:
128
+
129
+ a. A license of applicable copyright and neighbouring rights;
130
+
131
+ b. A license of the Database Right; and
132
+
133
+ c. An agreement in contract between You and the Licensor.
134
+
135
+ 2.2 Legal rights covered. This License covers the legal rights in the
136
+ Database, including:
137
+
138
+ a. Copyright. Any copyright or neighbouring rights in the Database.
139
+ The copyright licensed includes any individual elements of the
140
+ Database, but does not cover the copyright over the Contents
141
+ independent of this Database. See Section 2.4 for details. Copyright
142
+ law varies between jurisdictions, but is likely to cover: the Database
143
+ model or schema, which is the structure, arrangement, and organisation
144
+ of the Database, and can also include the Database tables and table
145
+ indexes; the data entry and output sheets; and the Field names of
146
+ Contents stored in the Database;
147
+
148
+ b. Database Rights. Database Rights only extend to the Extraction and
149
+ Re-utilisation of the whole or a Substantial part of the Contents.
150
+ Database Rights can apply even when there is no copyright over the
151
+ Database. Database Rights can also apply when the Contents are removed
152
+ from the Database and are selected and arranged in a way that would
153
+ not infringe any applicable copyright; and
154
+
155
+ c. Contract. This is an agreement between You and the Licensor for
156
+ access to the Database. In return you agree to certain conditions of
157
+ use on this access as outlined in this License.
158
+
159
+ 2.3 Rights not covered.
160
+
161
+ a. This License does not apply to computer programs used in the making
162
+ or operation of the Database;
163
+
164
+ b. This License does not cover any patents over the Contents or the
165
+ Database; and
166
+
167
+ c. This License does not cover any trademarks associated with the
168
+ Database.
169
+
170
+ 2.4 Relationship to Contents in the Database. The individual items of
171
+ the Contents contained in this Database may be covered by other rights,
172
+ including copyright, patent, data protection, privacy, or personality
173
+ rights, and this License does not cover any rights (other than Database
174
+ Rights or in contract) in individual Contents contained in the Database.
175
+ For example, if used on a Database of images (the Contents), this
176
+ License would not apply to copyright over individual images, which could
177
+ have their own separate licenses, or one single license covering all of
178
+ the rights over the images.
179
+
180
+ ### 3.0 Rights granted
181
+
182
+ 3.1 Subject to the terms and conditions of this License, the Licensor
183
+ grants to You a worldwide, royalty-free, non-exclusive, terminable (but
184
+ only under Section 9) license to Use the Database for the duration of
185
+ any applicable copyright and Database Rights. These rights explicitly
186
+ include commercial use, and do not exclude any field of endeavour. To
187
+ the extent possible in the relevant jurisdiction, these rights may be
188
+ exercised in all media and formats whether now known or created in the
189
+ future.
190
+
191
+ The rights granted cover, for example:
192
+
193
+ a. Extraction and Re-utilisation of the whole or a Substantial part of
194
+ the Contents;
195
+
196
+ b. Creation of Derivative Databases;
197
+
198
+ c. Creation of Collective Databases;
199
+
200
+ d. Creation of temporary or permanent reproductions by any means and
201
+ in any form, in whole or in part, including of any Derivative
202
+ Databases or as a part of Collective Databases; and
203
+
204
+ e. Distribution, communication, display, lending, making available, or
205
+ performance to the public by any means and in any form, in whole or in
206
+ part, including of any Derivative Database or as a part of Collective
207
+ Databases.
208
+
209
+ 3.2 Compulsory license schemes. For the avoidance of doubt:
210
+
211
+ a. Non-waivable compulsory license schemes. In those jurisdictions in
212
+ which the right to collect royalties through any statutory or
213
+ compulsory licensing scheme cannot be waived, the Licensor reserves
214
+ the exclusive right to collect such royalties for any exercise by You
215
+ of the rights granted under this License;
216
+
217
+ b. Waivable compulsory license schemes. In those jurisdictions in
218
+ which the right to collect royalties through any statutory or
219
+ compulsory licensing scheme can be waived, the Licensor waives the
220
+ exclusive right to collect such royalties for any exercise by You of
221
+ the rights granted under this License; and,
222
+
223
+ c. Voluntary license schemes. The Licensor waives the right to collect
224
+ royalties, whether individually or, in the event that the Licensor is
225
+ a member of a collecting society that administers voluntary licensing
226
+ schemes, via that society, from any exercise by You of the rights
227
+ granted under this License.
228
+
229
+ 3.3 The right to release the Database under different terms, or to stop
230
+ distributing or making available the Database, is reserved. Note that
231
+ this Database may be multiple-licensed, and so You may have the choice
232
+ of using alternative licenses for this Database. Subject to Section
233
+ 10.4, all other rights not expressly granted by Licensor are reserved.
234
+
235
+ ### 4.0 Conditions of Use
236
+
237
+ 4.1 The rights granted in Section 3 above are expressly made subject to
238
+ Your complying with the following conditions of use. These are important
239
+ conditions of this License, and if You fail to follow them, You will be
240
+ in material breach of its terms.
241
+
242
+ 4.2 Notices. If You Publicly Convey this Database, any Derivative
243
+ Database, or the Database as part of a Collective Database, then You
244
+ must:
245
+
246
+ a. Do so only under the terms of this License or another license
247
+ permitted under Section 4.4;
248
+
249
+ b. Include a copy of this License (or, as applicable, a license
250
+ permitted under Section 4.4) or its Uniform Resource Identifier (URI)
251
+ with the Database or Derivative Database, including both in the
252
+ Database or Derivative Database and in any relevant documentation; and
253
+
254
+ c. Keep intact any copyright or Database Right notices and notices
255
+ that refer to this License.
256
+
257
+ d. If it is not possible to put the required notices in a particular
258
+ file due to its structure, then You must include the notices in a
259
+ location (such as a relevant directory) where users would be likely to
260
+ look for it.
261
+
262
+ 4.3 Notice for using output (Contents). Creating and Using a Produced
263
+ Work does not require the notice in Section 4.2. However, if you
264
+ Publicly Use a Produced Work, You must include a notice associated with
265
+ the Produced Work reasonably calculated to make any Person that uses,
266
+ views, accesses, interacts with, or is otherwise exposed to the Produced
267
+ Work aware that Content was obtained from the Database, Derivative
268
+ Database, or the Database as part of a Collective Database, and that it
269
+ is available under this License.
270
+
271
+ a. Example notice. The following text will satisfy notice under
272
+ Section 4.3:
273
+
274
+ Contains information from DATABASE NAME, which is made available
275
+ here under the Open Database License (ODbL).
276
+
277
+ DATABASE NAME should be replaced with the name of the Database and a
278
+ hyperlink to the URI of the Database. "Open Database License" should
279
+ contain a hyperlink to the URI of the text of this License. If
280
+ hyperlinks are not possible, You should include the plain text of the
281
+ required URI's with the above notice.
282
+
283
+ 4.4 Share alike.
284
+
285
+ a. Any Derivative Database that You Publicly Use must be only under
286
+ the terms of:
287
+
288
+ i. This License;
289
+
290
+ ii. A later version of this License similar in spirit to this
291
+ License; or
292
+
293
+ iii. A compatible license.
294
+
295
+ If You license the Derivative Database under one of the licenses
296
+ mentioned in (iii), You must comply with the terms of that license.
297
+
298
+ b. For the avoidance of doubt, Extraction or Re-utilisation of the
299
+ whole or a Substantial part of the Contents into a new database is a
300
+ Derivative Database and must comply with Section 4.4.
301
+
302
+ c. Derivative Databases and Produced Works. A Derivative Database is
303
+ Publicly Used and so must comply with Section 4.4. if a Produced Work
304
+ created from the Derivative Database is Publicly Used.
305
+
306
+ d. Share Alike and additional Contents. For the avoidance of doubt,
307
+ You must not add Contents to Derivative Databases under Section 4.4 a
308
+ that are incompatible with the rights granted under this License.
309
+
310
+ e. Compatible licenses. Licensors may authorise a proxy to determine
311
+ compatible licenses under Section 4.4 a iii. If they do so, the
312
+ authorised proxy's public statement of acceptance of a compatible
313
+ license grants You permission to use the compatible license.
314
+
315
+ 4.5 Limits of Share Alike. The requirements of Section 4.4 do not apply
316
+ in the following:
317
+
318
+ a. For the avoidance of doubt, You are not required to license
319
+ Collective Databases under this License if You incorporate this
320
+ Database or a Derivative Database in the collection, but this License
321
+ still applies to this Database or a Derivative Database as a part of
322
+ the Collective Database;
323
+
324
+ b. Using this Database, a Derivative Database, or this Database as
325
+ part of a Collective Database to create a Produced Work does not
326
+ create a Derivative Database for purposes of Section 4.4; and
327
+
328
+ c. Use of a Derivative Database internally within an organisation is
329
+ not to the public and therefore does not fall under the requirements
330
+ of Section 4.4.
331
+
332
+ 4.6 Access to Derivative Databases. If You Publicly Use a Derivative
333
+ Database or a Produced Work from a Derivative Database, You must also
334
+ offer to recipients of the Derivative Database or Produced Work a copy
335
+ in a machine readable form of:
336
+
337
+ a. The entire Derivative Database; or
338
+
339
+ b. A file containing all of the alterations made to the Database or
340
+ the method of making the alterations to the Database (such as an
341
+ algorithm), including any additional Contents, that make up all the
342
+ differences between the Database and the Derivative Database.
343
+
344
+ The Derivative Database (under a.) or alteration file (under b.) must be
345
+ available at no more than a reasonable production cost for physical
346
+ distributions and free of charge if distributed over the internet.
347
+
348
+ 4.7 Technological measures and additional terms
349
+
350
+ a. This License does not allow You to impose (except subject to
351
+ Section 4.7 b.) any terms or any technological measures on the
352
+ Database, a Derivative Database, or the whole or a Substantial part of
353
+ the Contents that alter or restrict the terms of this License, or any
354
+ rights granted under it, or have the effect or intent of restricting
355
+ the ability of any person to exercise those rights.
356
+
357
+ b. Parallel distribution. You may impose terms or technological
358
+ measures on the Database, a Derivative Database, or the whole or a
359
+ Substantial part of the Contents (a "Restricted Database") in
360
+ contravention of Section 4.74 a. only if You also make a copy of the
361
+ Database or a Derivative Database available to the recipient of the
362
+ Restricted Database:
363
+
364
+ i. That is available without additional fee;
365
+
366
+ ii. That is available in a medium that does not alter or restrict
367
+ the terms of this License, or any rights granted under it, or have
368
+ the effect or intent of restricting the ability of any person to
369
+ exercise those rights (an "Unrestricted Database"); and
370
+
371
+ iii. The Unrestricted Database is at least as accessible to the
372
+ recipient as a practical matter as the Restricted Database.
373
+
374
+ c. For the avoidance of doubt, You may place this Database or a
375
+ Derivative Database in an authenticated environment, behind a
376
+ password, or within a similar access control scheme provided that You
377
+ do not alter or restrict the terms of this License or any rights
378
+ granted under it or have the effect or intent of restricting the
379
+ ability of any person to exercise those rights.
380
+
381
+ 4.8 Licensing of others. You may not sublicense the Database. Each time
382
+ You communicate the Database, the whole or Substantial part of the
383
+ Contents, or any Derivative Database to anyone else in any way, the
384
+ Licensor offers to the recipient a license to the Database on the same
385
+ terms and conditions as this License. You are not responsible for
386
+ enforcing compliance by third parties with this License, but You may
387
+ enforce any rights that You have over a Derivative Database. You are
388
+ solely responsible for any modifications of a Derivative Database made
389
+ by You or another Person at Your direction. You may not impose any
390
+ further restrictions on the exercise of the rights granted or affirmed
391
+ under this License.
392
+
393
+ ### 5.0 Moral rights
394
+
395
+ 5.1 Moral rights. This section covers moral rights, including any rights
396
+ to be identified as the author of the Database or to object to treatment
397
+ that would otherwise prejudice the author's honour and reputation, or
398
+ any other derogatory treatment:
399
+
400
+ a. For jurisdictions allowing waiver of moral rights, Licensor waives
401
+ all moral rights that Licensor may have in the Database to the fullest
402
+ extent possible by the law of the relevant jurisdiction under Section
403
+ 10.4;
404
+
405
+ b. If waiver of moral rights under Section 5.1 a in the relevant
406
+ jurisdiction is not possible, Licensor agrees not to assert any moral
407
+ rights over the Database and waives all claims in moral rights to the
408
+ fullest extent possible by the law of the relevant jurisdiction under
409
+ Section 10.4; and
410
+
411
+ c. For jurisdictions not allowing waiver or an agreement not to assert
412
+ moral rights under Section 5.1 a and b, the author may retain their
413
+ moral rights over certain aspects of the Database.
414
+
415
+ Please note that some jurisdictions do not allow for the waiver of moral
416
+ rights, and so moral rights may still subsist over the Database in some
417
+ jurisdictions.
418
+
419
+ ### 6.0 Fair dealing, Database exceptions, and other rights not affected
420
+
421
+ 6.1 This License does not affect any rights that You or anyone else may
422
+ independently have under any applicable law to make any use of this
423
+ Database, including without limitation:
424
+
425
+ a. Exceptions to the Database Right including: Extraction of Contents
426
+ from non-electronic Databases for private purposes, Extraction for
427
+ purposes of illustration for teaching or scientific research, and
428
+ Extraction or Re-utilisation for public security or an administrative
429
+ or judicial procedure.
430
+
431
+ b. Fair dealing, fair use, or any other legally recognised limitation
432
+ or exception to infringement of copyright or other applicable laws.
433
+
434
+ 6.2 This License does not affect any rights of lawful users to Extract
435
+ and Re-utilise insubstantial parts of the Contents, evaluated
436
+ quantitatively or qualitatively, for any purposes whatsoever, including
437
+ creating a Derivative Database (subject to other rights over the
438
+ Contents, see Section 2.4). The repeated and systematic Extraction or
439
+ Re-utilisation of insubstantial parts of the Contents may however amount
440
+ to the Extraction or Re-utilisation of a Substantial part of the
441
+ Contents.
442
+
443
+ ### 7.0 Warranties and Disclaimer
444
+
445
+ 7.1 The Database is licensed by the Licensor "as is" and without any
446
+ warranty of any kind, either express, implied, or arising by statute,
447
+ custom, course of dealing, or trade usage. Licensor specifically
448
+ disclaims any and all implied warranties or conditions of title,
449
+ non-infringement, accuracy or completeness, the presence or absence of
450
+ errors, fitness for a particular purpose, merchantability, or otherwise.
451
+ Some jurisdictions do not allow the exclusion of implied warranties, so
452
+ this exclusion may not apply to You.
453
+
454
+ ### 8.0 Limitation of liability
455
+
456
+ 8.1 Subject to any liability that may not be excluded or limited by law,
457
+ the Licensor is not liable for, and expressly excludes, all liability
458
+ for loss or damage however and whenever caused to anyone by any use
459
+ under this License, whether by You or by anyone else, and whether caused
460
+ by any fault on the part of the Licensor or not. This exclusion of
461
+ liability includes, but is not limited to, any special, incidental,
462
+ consequential, punitive, or exemplary damages such as loss of revenue,
463
+ data, anticipated profits, and lost business. This exclusion applies
464
+ even if the Licensor has been advised of the possibility of such
465
+ damages.
466
+
467
+ 8.2 If liability may not be excluded by law, it is limited to actual and
468
+ direct financial loss to the extent it is caused by proved negligence on
469
+ the part of the Licensor.
470
+
471
+ ### 9.0 Termination of Your rights under this License
472
+
473
+ 9.1 Any breach by You of the terms and conditions of this License
474
+ automatically terminates this License with immediate effect and without
475
+ notice to You. For the avoidance of doubt, Persons who have received the
476
+ Database, the whole or a Substantial part of the Contents, Derivative
477
+ Databases, or the Database as part of a Collective Database from You
478
+ under this License will not have their licenses terminated provided
479
+ their use is in full compliance with this License or a license granted
480
+ under Section 4.8 of this License. Sections 1, 2, 7, 8, 9 and 10 will
481
+ survive any termination of this License.
482
+
483
+ 9.2 If You are not in breach of the terms of this License, the Licensor
484
+ will not terminate Your rights under it.
485
+
486
+ 9.3 Unless terminated under Section 9.1, this License is granted to You
487
+ for the duration of applicable rights in the Database.
488
+
489
+ 9.4 Reinstatement of rights. If you cease any breach of the terms and
490
+ conditions of this License, then your full rights under this License
491
+ will be reinstated:
492
+
493
+ a. Provisionally and subject to permanent termination until the 60th
494
+ day after cessation of breach;
495
+
496
+ b. Permanently on the 60th day after cessation of breach unless
497
+ otherwise reasonably notified by the Licensor; or
498
+
499
+ c. Permanently if reasonably notified by the Licensor of the
500
+ violation, this is the first time You have received notice of
501
+ violation of this License from the Licensor, and You cure the
502
+ violation prior to 30 days after your receipt of the notice.
503
+
504
+ Persons subject to permanent termination of rights are not eligible to
505
+ be a recipient and receive a license under Section 4.8.
506
+
507
+ 9.5 Notwithstanding the above, Licensor reserves the right to release
508
+ the Database under different license terms or to stop distributing or
509
+ making available the Database. Releasing the Database under different
510
+ license terms or stopping the distribution of the Database will not
511
+ withdraw this License (or any other license that has been, or is
512
+ required to be, granted under the terms of this License), and this
513
+ License will continue in full force and effect unless terminated as
514
+ stated above.
515
+
516
+ ### 10.0 General
517
+
518
+ 10.1 If any provision of this License is held to be invalid or
519
+ unenforceable, that must not affect the validity or enforceability of
520
+ the remainder of the terms and conditions of this License and each
521
+ remaining provision of this License shall be valid and enforced to the
522
+ fullest extent permitted by law.
523
+
524
+ 10.2 This License is the entire agreement between the parties with
525
+ respect to the rights granted here over the Database. It replaces any
526
+ earlier understandings, agreements or representations with respect to
527
+ the Database.
528
+
529
+ 10.3 If You are in breach of the terms of this License, You will not be
530
+ entitled to rely on the terms of this License or to complain of any
531
+ breach by the Licensor.
532
+
533
+ 10.4 Choice of law. This License takes effect in and will be governed by
534
+ the laws of the relevant jurisdiction in which the License terms are
535
+ sought to be enforced. If the standard suite of rights granted under
536
+ applicable copyright law and Database Rights in the relevant
537
+ jurisdiction includes additional rights not granted under this License,
538
+ these additional rights are granted in this License in order to meet the
539
+ terms of this License.
data/NOTICE ADDED
@@ -0,0 +1,15 @@
1
+ tzf2
2
+ Copyright 2026 Joseph Lozano
3
+
4
+ This product includes software from tzf-rs (MIT), copyright ringsaturn.
5
+ See https://github.com/ringsaturn/tzf-rs
6
+
7
+ Embedded timezone boundary data comes from tzf-dist, which redistributes
8
+ processed data from evansiroky/timezone-boundary-builder. That database is
9
+ licensed under the Open Database License (ODbL) v1.0. See LICENSE_DATA.
10
+
11
+ Source database:
12
+ https://github.com/evansiroky/timezone-boundary-builder
13
+
14
+ Processed distribution:
15
+ https://github.com/ringsaturn/tzf-dist
data/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # tzf2
2
+
3
+ Offline latitude and longitude to IANA timezone lookup for Ruby. The gem wraps [tzf-rs](https://github.com/ringsaturn/tzf-rs) 2.0 and embeds current ocean-inclusive boundary data from [tzf-dist](https://github.com/ringsaturn/tzf-dist). Lookups do not use the network.
4
+
5
+ This gem is a drop-in successor to [`tzf`](https://github.com/HarlemSquirrel/tzf-rb) for Rails apps that already call `TZF.tz_name(lat, lng)`. The published gem name is `tzf2` so it does not collide with HarlemSquirrel's gem.
6
+
7
+ ## Install
8
+
9
+ You need Ruby 3.2 or newer (including 4.0).
10
+
11
+ Precompiled native gems ship for `x86_64-linux`, `aarch64-linux`, `x86_64-darwin`, and `arm64-darwin`. Other platforms compile from source and need clang plus Rust 1.88 or newer.
12
+
13
+ ```ruby
14
+ # Gemfile
15
+ gem "tzf2"
16
+ ```
17
+
18
+ Then run:
19
+
20
+ ```bash
21
+ bundle install
22
+ ```
23
+
24
+ `require "tzf2"` and `require "tzf"` both load the `TZF` module.
25
+
26
+ ## Usage
27
+
28
+ Arguments are latitude first, then longitude. That matches the existing `tzf` gem. It is the opposite of the Rust and Python APIs.
29
+
30
+ ```ruby
31
+ require "tzf2"
32
+
33
+ TZF.tz_name(40.7477, -73.9935)
34
+ # => "America/New_York"
35
+
36
+ TZF.tz_names(44.04, 87.416)
37
+ # => ["Asia/Shanghai", "Asia/Urumqi"]
38
+
39
+ TZF.data_version
40
+ # => "2026c"
41
+
42
+ TZF.engine_version
43
+ # => "2.0.0"
44
+ ```
45
+
46
+ `tz_name` returns one IANA identifier. `tz_names` returns every match, sorted, which matters on shared borders.
47
+
48
+ Invalid coordinates raise `TZF::InvalidCoordinatesError`.
49
+
50
+ ```ruby
51
+ TZF.tz_name(91, 0)
52
+ # TZF::InvalidCoordinatesError: latitude 91.0 is outside -90..90
53
+ ```
54
+
55
+ A valid point with no covering polygon raises `TZF::UncoveredCoordinateError`. Rescue that in the application if you need a fallback. This gem does not guess a neighbor zone.
56
+
57
+ ```ruby
58
+ TZF.tz_name(-54.1, -36.1)
59
+ # TZF::UncoveredCoordinateError: no timezone covers latitude -54.1, longitude -36.1
60
+ ```
61
+
62
+ `raw_tz_name` and `raw_tz_names` return the engine result without raising (`""` / `[]` on a miss).
63
+
64
+ ## Global coverage
65
+
66
+ The embedded dataset is timezone-boundary-builder `timezones-with-oceans` as packaged by tzf-dist release `2026c`. That product includes land zones, territorial waters, polar regions, and open-ocean `Etc/GMT*` zones. It does not tile the sphere without gaps.
67
+
68
+ Lite simplification and a few source/encoding slivers leave hairline holes. A 10-degree grid is fully covered in `spec/fixtures/differential_baseline.json`. A 0.1-degree walk is not. Full-precision `tzf-dist` data closes some lite holes and still misses others.
69
+
70
+ This gem returns `UncoveredCoordinateError` on those points. It does not snap to a neighbor.
71
+
72
+ This release reports 444 timezone names.
73
+
74
+ The default dataset is the lite `.tzb` file. Simplified boundaries stay within about 111 m of the full-precision border. See the [tzf-rs accuracy notes](https://github.com/ringsaturn/tzf-rs#accuracy).
75
+
76
+ ## Ocean timezone semantics
77
+
78
+ Open ocean uses POSIX-signed `Etc/GMT*` identifiers.
79
+
80
+ - `Etc/GMT+8` is UTC-08:00.
81
+ - `Etc/GMT-5` is UTC+05:00.
82
+
83
+ Point Nemo (`-48.876667, -123.393333`) returns `Etc/GMT+8`. Coastal points inside territorial waters keep the land zone.
84
+
85
+ ## Data provenance
86
+
87
+ | Layer | Source | License |
88
+ | --- | --- | --- |
89
+ | Ruby and Rust wrapper | this repository | MIT, see `LICENSE` |
90
+ | Lookup engine | [tzf-rs](https://github.com/ringsaturn/tzf-rs) 2.0.0 | MIT |
91
+ | Packed `.tzb` data | [tzf-dist](https://github.com/ringsaturn/tzf-dist) `2026c` | ODbL, see `LICENSE_DATA` |
92
+ | Original boundaries | [timezone-boundary-builder](https://github.com/evansiroky/timezone-boundary-builder) | ODbL |
93
+
94
+ The original database is built from OpenStreetMap. `NOTICE` names both upstreams.
95
+
96
+ ## Version reporting
97
+
98
+ - `TZF::VERSION` is this gem.
99
+ - `TZF.engine_version` is the compiled `tzf-rs` crate.
100
+ - `TZF.data_version` is the tzf-dist / timezone-boundary-builder release inside the binary.
101
+
102
+ Pin all three when you record a production lookup result.
103
+
104
+ ## Upgrades
105
+
106
+ 1. Bump `tzf-rs` in `ext/tzf2/Cargo.toml`.
107
+ 2. Run `cargo update -p tzf-rs` and `bundle exec rake compile`.
108
+ 3. Run `bundle exec rake spec`.
109
+ 4. Run `bundle exec ruby bin/differential`.
110
+ 5. If the report lists timezone-id, timezone-names, UTC-offset, newly covered, or uncovered points, decide whether the new data is intended.
111
+ 6. To accept the new table, run `bundle exec rake differential:write` and update `spec/fixtures/locations.yml`.
112
+ 7. Set `TZF.engine_version` in `ext/tzf2/src/lib.rs` to the new crate version.
113
+
114
+ ## Testing
115
+
116
+ ```bash
117
+ bin/setup
118
+ bundle exec rake
119
+ bundle exec rake differential
120
+ ```
121
+
122
+ Specs cover major cities, ocean zones including Point Nemo, polar and antimeridian points, shared borders, latitude/longitude order, invalid input, and thread safety.
123
+
124
+ A 10-degree world grid and a 0.1-degree world grid are looked up in a standalone Rust binary (`crates/grid_parity`) and again through `TZF.raw_tz_name` / `TZF.raw_tz_names`. The answers must match, including empty engine results. That checks the Ruby wrapper against tzf-rs, not against a pinned Ruby table.
125
+
126
+ The differential suite compares the current engine to `spec/fixtures/differential_baseline.json`. It reports timezone-id changes, all-match list changes, UTC-offset changes at `2026-01-15T12:00:00Z`, and points that gained or lost coverage.
127
+
128
+ ## Rollback
129
+
130
+ Keep the previous `tzf2` git SHA in the Gemfile if a data upgrade changes production answers.
131
+
132
+ ```ruby
133
+ gem "tzf2", github: "joseph-lozano/tzf-2-rb", ref: "<known-good-sha>"
134
+ ```
135
+
136
+ To go back to HarlemSquirrel's gem, restore `gem "tzf"` and `require "tzf"`. The call shape is the same. Answers can differ because that gem still tracks tzf-rs 1.x.
137
+
138
+ ## Supported platforms
139
+
140
+ CI compiles and tests Ruby 3.2, 3.3, 3.4, and 4.0 on Ubuntu, plus Ruby 3.4 on `ubuntu-24.04-arm`, `macos-15-intel`, and `macos-latest`.
141
+
142
+ Release builds precompiled gems for Linux x86_64, Linux ARM64, Intel Mac, and Apple Silicon. Windows is not supported.
143
+
144
+ ## License
145
+
146
+ MIT for the wrapper. ODbL for the embedded boundary database. See `LICENSE`, `LICENSE_DATA`, and `NOTICE`.
data/lib/tzf.rb ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "tzf2"
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TZF
4
+ class Coordinates
5
+ attr_reader :latitude, :longitude
6
+
7
+ def self.parse(latitude, longitude)
8
+ new(latitude, longitude)
9
+ end
10
+
11
+ def initialize(latitude, longitude)
12
+ @latitude = finite_float(latitude, "latitude")
13
+ @longitude = finite_float(longitude, "longitude")
14
+ unless (-90.0..90.0).cover?(@latitude)
15
+ raise InvalidCoordinatesError, "latitude #{@latitude} is outside -90..90"
16
+ end
17
+ unless (-180.0..180.0).cover?(@longitude)
18
+ raise InvalidCoordinatesError, "longitude #{@longitude} is outside -180..180"
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def finite_float(value, name)
25
+ unless value.is_a?(Numeric)
26
+ raise InvalidCoordinatesError, "#{name} must be numeric, got #{value.class}"
27
+ end
28
+
29
+ float = Float(value)
30
+ unless float.finite?
31
+ raise InvalidCoordinatesError, "#{name} must be a finite number"
32
+ end
33
+
34
+ float
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TZF
4
+ class Error < StandardError; end
5
+
6
+ class InvalidCoordinatesError < Error; end
7
+
8
+ class UncoveredCoordinateError < Error; end
9
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TZF
4
+ VERSION = "0.0.1"
5
+ end
data/lib/tzf2.rb ADDED
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "tzf2/version"
4
+ require_relative "tzf2/errors"
5
+ require_relative "tzf2/coordinates"
6
+
7
+ ruby_minor_version = RUBY_VERSION.split(".")[0..1].join(".")
8
+ versioned = File.join(__dir__, "tzf2", ruby_minor_version, "tzf2")
9
+ if File.exist?("#{versioned}.bundle") || File.exist?("#{versioned}.so")
10
+ require versioned
11
+ else
12
+ require_relative "tzf2/tzf2"
13
+ end
14
+
15
+ module TZF
16
+ class << self
17
+ def tz_name(latitude, longitude)
18
+ coords = Coordinates.parse(latitude, longitude)
19
+ name = raw_tz_name(coords.latitude, coords.longitude)
20
+ raise uncovered_error(coords) if name.empty?
21
+
22
+ name
23
+ end
24
+
25
+ def tz_names(latitude, longitude)
26
+ coords = Coordinates.parse(latitude, longitude)
27
+ names = raw_tz_names(coords.latitude, coords.longitude)
28
+ raise uncovered_error(coords) if names.empty?
29
+
30
+ names
31
+ end
32
+
33
+ def data_version
34
+ raw_data_version
35
+ end
36
+
37
+ def engine_version
38
+ raw_engine_version
39
+ end
40
+
41
+ def timezone_names
42
+ raw_timezone_names
43
+ end
44
+
45
+ private
46
+
47
+ def uncovered_error(coords)
48
+ UncoveredCoordinateError.new(
49
+ "no timezone covers latitude #{coords.latitude}, longitude #{coords.longitude}"
50
+ )
51
+ end
52
+ end
53
+ end
data/sig/tzf.rbs ADDED
@@ -0,0 +1,26 @@
1
+ module TZF
2
+ VERSION: String
3
+
4
+ class Error < StandardError
5
+ end
6
+
7
+ class InvalidCoordinatesError < Error
8
+ end
9
+
10
+ class UncoveredCoordinateError < Error
11
+ end
12
+
13
+ class Coordinates
14
+ attr_reader latitude: Float
15
+ attr_reader longitude: Float
16
+
17
+ def self.parse: (Numeric latitude, Numeric longitude) -> Coordinates
18
+ def initialize: (Numeric latitude, Numeric longitude) -> void
19
+ end
20
+
21
+ def self.tz_name: (Numeric latitude, Numeric longitude) -> String
22
+ def self.tz_names: (Numeric latitude, Numeric longitude) -> Array[String]
23
+ def self.data_version: () -> String
24
+ def self.engine_version: () -> String
25
+ def self.timezone_names: () -> Array[String]
26
+ end
data/tzf2.gemspec ADDED
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/tzf2/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "tzf2"
7
+ spec.version = TZF::VERSION
8
+ spec.authors = ["Joseph Lozano"]
9
+ spec.email = ["me@lozanojoseph.com"]
10
+
11
+ spec.summary = "Offline latitude/longitude to IANA timezone lookup via tzf-rs 2"
12
+ spec.description = <<~DESC
13
+ Ruby wrapper around tzf-rs v2 for offline timezone lookup from WGS84
14
+ coordinates. Embeds current ocean-inclusive timezone-boundary-builder data
15
+ from tzf-dist. No runtime network access.
16
+ DESC
17
+ spec.homepage = "https://github.com/joseph-lozano/tzf-2-rb"
18
+ spec.license = "MIT"
19
+ spec.required_ruby_version = ">= 3.2.0"
20
+ spec.required_rubygems_version = ">= 3.4.6"
21
+
22
+ spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
23
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
24
+ spec.metadata["homepage_uri"] = spec.homepage
25
+ spec.metadata["rubygems_mfa_required"] = "true"
26
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
27
+
28
+ spec.files = %w[
29
+ CHANGELOG.md
30
+ Cargo.lock
31
+ Cargo.toml
32
+ LICENSE
33
+ LICENSE_DATA
34
+ NOTICE
35
+ README.md
36
+ ext/tzf2/Cargo.toml
37
+ ext/tzf2/extconf.rb
38
+ ext/tzf2/src/lib.rs
39
+ lib/tzf.rb
40
+ lib/tzf2.rb
41
+ lib/tzf2/coordinates.rb
42
+ lib/tzf2/errors.rb
43
+ lib/tzf2/version.rb
44
+ sig/tzf.rbs
45
+ tzf2.gemspec
46
+ ]
47
+ spec.bindir = "exe"
48
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
49
+ spec.require_paths = ["lib"]
50
+ spec.extensions = ["ext/tzf2/extconf.rb"]
51
+
52
+ spec.add_dependency "rb_sys", "~> 0.9.117"
53
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tzf2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: x86_64-linux
6
+ authors:
7
+ - Joseph Lozano
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2026-09-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |
14
+ Ruby wrapper around tzf-rs v2 for offline timezone lookup from WGS84
15
+ coordinates. Embeds current ocean-inclusive timezone-boundary-builder data
16
+ from tzf-dist. No runtime network access.
17
+ email:
18
+ - me@lozanojoseph.com
19
+ executables: []
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - CHANGELOG.md
24
+ - LICENSE
25
+ - LICENSE_DATA
26
+ - NOTICE
27
+ - README.md
28
+ - lib/tzf.rb
29
+ - lib/tzf2.rb
30
+ - lib/tzf2/3.2/tzf2.so
31
+ - lib/tzf2/3.3/tzf2.so
32
+ - lib/tzf2/3.4/tzf2.so
33
+ - lib/tzf2/4.0/tzf2.so
34
+ - lib/tzf2/coordinates.rb
35
+ - lib/tzf2/errors.rb
36
+ - lib/tzf2/version.rb
37
+ - sig/tzf.rbs
38
+ - tzf2.gemspec
39
+ homepage: https://github.com/joseph-lozano/tzf-2-rb
40
+ licenses:
41
+ - MIT
42
+ metadata:
43
+ bug_tracker_uri: https://github.com/joseph-lozano/tzf-2-rb/issues
44
+ changelog_uri: https://github.com/joseph-lozano/tzf-2-rb/blob/main/CHANGELOG.md
45
+ homepage_uri: https://github.com/joseph-lozano/tzf-2-rb
46
+ rubygems_mfa_required: 'true'
47
+ allowed_push_host: https://rubygems.org
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '3.2'
57
+ - - "<"
58
+ - !ruby/object:Gem::Version
59
+ version: 4.1.dev
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 3.4.6
65
+ requirements: []
66
+ rubygems_version: 3.5.23
67
+ signing_key:
68
+ specification_version: 4
69
+ summary: Offline latitude/longitude to IANA timezone lookup via tzf-rs 2
70
+ test_files: []