Open cicika opened 9 years ago
I have confirmed this using latest tz_world
data. Using this code, I found the bounding box of this anomaly to be:
http://bbox.me/osm/index.html?bbox=55.812497,12.562490,56.000007,12.750010
I've opened the tz_world shapefile in Qgis and AFAIK it looks OK. Selecting 'Asia/Phnom_Penh' and zooming in on that does not include any area near Denmark.
Sorry, I can't look at this anytime soon. I'm offline for two weeks starting tomorrow, on vacation. Let me know if you discover any other clues.
I notice that the tests are failing and timezone Asia/Phnom_Penh
appears in the output. Coincidence?
Sorry, ignore that. Tests were failing due to non-existence of tables. Tests are OK :blush:
latlong_test.go
contains this comment alluding to a previous bug involving Asia/Phnom_Penh
// previous bug with the wrong oceanIndex. This pixmap
// leaf resolves to leaf index 0xff (Asia/Phnom_Penh).
// It was being treated as a special value. It's not.
Singapore airport also resolves to Asia/Phnom_Penh... If I ever get the time I might make a pull request.
@bradfitz I know that this library isn't supposed to be very accurate and you probably don't have time to mantain this.
Would you have recommendations for a more accurate go library to use?
Not off the top of my head.
@cicika, @sidazhang, could either of you try this again with the latest data?
I tested this earlier and thought it looked good, but turns out that the coords @cicika supplied now return no timezone! e.g.
lat := 55.850667
lon := 12.56804
fmt.Println(latlong.LookupZoneName(lat, lon))
returns blank. I've tried a few other locations around the globe and they return correct results.
I still get the above result – blank zone names for certain lat, lng's, looks like it's usually when it's close to the water.
For Singapore I also get blank zone names
lat := 1.294719
long := 103.774107
fmt.Println(latlong.LookupZoneName(lat, long))
How to fix it?
Hi!
There's a patch of Denmark that resolves into Asia/Phnom_Penh timezone, which is quite unusual. I would have addressed the problem myself, but, admittedly, I have been playing with the language only for a short while, and wouldn't even know where to start.
Example coords: 55.850667, 12.56804
Awesome lib by the way and a wonderful solution to the problem.
Thanks!