TE
테크에코
홈24시간 인기최신베스트질문쇼채용
GitHubTwitter
홈

테크에코

Next.js로 구축된 기술 뉴스 플랫폼으로 글로벌 기술 뉴스와 토론을 제공합니다.

GitHubTwitter

홈

홈최신베스트질문쇼채용

리소스

HackerNews API원본 HackerNewsNext.js

© 2025 테크에코. 모든 권리 보유.

Show HN: A Simple Server to Match Long/Lat to a TimeZone

49 포인트작성자: ChrisMarshallNY5일 전
I figured this might be useful to folks.<p>It&#x27;s a simple PHP server that requires a single-table database (It&#x27;s fairly &quot;agnostic,&quot; but all my uses are in MySQL).<p>I won&#x27;t publish any of the servers that I&#x27;ve set up for my apps, because someone is bound to write an application that drives my bandwidth into the stratosphere.<p>I could definitely take it further, but this gives me all I need for my purposes.<p>Here&#x27;s an app I wrote, that uses it: <a href="https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;we-are-never-alone&#x2F;id6504826025">https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;we-are-never-alone&#x2F;id650482602...</a>

8 comments

kevmo3145일 전
Since the geojson for the timezone data is a static file you can avoid using a database entirely and ship it to your app.<p>If you&#x27;d like to avoid shipping a giant geojson, with the generosity of CDN providers you can actually hit the npm-hosting servers with HTTP Range requests and do this completely on demand from the client: <a href="https:&#x2F;&#x2F;github.com&#x2F;kevmo314&#x2F;browser-geo-tz">https:&#x2F;&#x2F;github.com&#x2F;kevmo314&#x2F;browser-geo-tz</a>
评论 #44046730 未加载
akhenakh5일 전
Look at this library embedding the TZ data, implemented in multiple languages, even providing an HTTP server <a href="https:&#x2F;&#x2F;github.com&#x2F;ringsaturn&#x2F;tzf">https:&#x2F;&#x2F;github.com&#x2F;ringsaturn&#x2F;tzf</a>
评论 #44047438 未加载
SahAssar5일 전
I&#x27;m guessing this does not try to handle things like terra nullius (Bir Tawil, Marie Byrd Land, etc.) or where there might not be a &quot;correct&quot; answer over which timezone is in a place (like <a href="https:&#x2F;&#x2F;www.972mag.com&#x2F;the-worlds-only-ethnic-time-zone&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.972mag.com&#x2F;the-worlds-only-ethnic-time-zone&#x2F;</a>)?
评论 #44046469 未加载
cyberax5일 전
Super nice! I wanted to do an Arduino-based GPS clock that always shows the correct local time, but got bogged down getting the exact timezone boundaries.<p>Thanks for bringing up <a href="https:&#x2F;&#x2F;github.com&#x2F;evansiroky&#x2F;timezone-boundary-builder">https:&#x2F;&#x2F;github.com&#x2F;evansiroky&#x2F;timezone-boundary-builder</a> !
评论 #44046495 未加载
OsrsNeedsf2P5일 전
I recently had this issue with an Android app I made, it was surprisingly difficult to resolve. I ended up going with some OpenStreetMap mirror endpoint for my solution
评论 #44047502 未加载
jony12664일 전
TIL that China only has one timezone... I really liked your visualization of all the timezones in the repo!
评论 #44055281 未加载
mgarciaisaia4일 전
I was under the impression that the standard was to use lat&#x2F;lng, rather than long&#x2F;lat. Is there such a standard thing, or I am generalizing my tiny corner of the bits?
评论 #44055293 未加载
NotAnOtter4일 전
A standalone server feels very excessive.<p>This is static data that only needs to be updated once or twice a year. Why not just make this an npm or py module
评论 #44048202 未加载