Laravel Timezone by City
A small Laravel package to retrieve timezone information for cities worldwide, backed by Carbon for date/time manipulation. Simple install, simple API.

Overview
A deliberately small Laravel package that answers one question: given a city name, what timezone is it in?
The dataset comes from the GeoNames Gazetteer and covered 146,892 cities at the last update, and Carbon does the date and time work on top of it. The API is three or four methods: check whether a city exists, list the cities available, and pull the full record for one of them.
It exists because the alternative in most projects is a hand-maintained array of a dozen cities that quietly goes wrong the moment someone outside them signs up.
What it does
146,892 cities worldwide as of the February 2024 dataset, not a hand-kept list.
Timezone results usable directly in the date handling Laravel already ships with.
cityExists, getAllCities and getAllData, which is the whole thing.
Built with
Details
- Type
- Open Source
- Built as
- PHP
- GitHub stars
- 15
- Latest release
- v1.0.0
More projects
19 others · drag to browse


















