![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/gaker/timezonelookup/v3
Is a timezone lookup API for GPS Coordinates to Timezone based on GeoJSON Polygon and Multipolygon files.
Source files can be obtained at https://github.com/evansiroky/timezone-boundary-builder
Performance is significantly improved between release v1 and release v2 due to the underlying data structure. Timezone database is approxiamtely 50mb in size and lookups range between 50 - 200 microseconds. Recent verion uses an RTree as well as a Memory mapped timezone database for reduced latency and increased throughput.
[]Benchmarks still need to be written.
Appreciate all who have contributed with Pull Requests and Issues. We eagerly welcome suggestions and PRs.
Rtree source design by Josh Backer tidwall
Build program
go build -o timezone cmd/main.go
Download datasource and build timezone database ~50mb
./timezone -build
Test query for San Fransisco, United States (Etc/GMT+8)
./timezone -search -lat=37.7749 -lng=-122.4194
Based on custom backing that loads data as memory mapped data.
package main
import (
"fmt"
timezone "github.com/evanoberholster/timezoneLookup@v2.0.0"
)
func main() {
var tzc timezone.Timezonecache
f, err := os.Open("timzone.data")
if err != nil {
return timezone.Result{}, err
}
defer f.Close()
if err = tzc.Load(f); err != nil {
return timezone.Result{}, err
}
defer tzc.Close()
lat := 37.7749
lng := -122.4194
result := tzc.Search(lat, lng)
fmt.Println(result)
}
Based on JSON, MsgPack, Protobuf or Cap'n'Proto encodings with boltDB backend
package main
import (
"fmt"
timezone "github.com/evanoberholster/timezoneLookup@v1.0.0"
)
var tz timezone.TimezoneInterface
func main() {
tz, err := timezone.LoadTimezones(timezone.Config{
DatabaseType:"boltdb", // memory or boltdb
DatabaseName:"timezone", // Name without suffix
Snappy: true,
Encoding: "msgpack", // json or msgpack
})
if err != nil {
fmt.Println(err)
}
res, err := tz.Query(timezone.Coord{
Lat: 5.261417, Lon: -3.925778,})
if err != nil {
fmt.Println(err)
}
fmt.Println("Query Result: ", res)
tz.Close()
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.