Search packages, repositories and app categories

Package detailsv0.2.0

lat_lng_to_timezone

Lat/long to timezone mapper in Dart. Does not require web services or data files

AndroidiOSWebmacOSWindowsLinux
30-day downloads
23.1K
Likes
25
Pub points
150

Install package

flutter pub add lat_lng_to_timezone

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Dart package that converts latitude and longitude coordinates to their corresponding timezone without relying on external web services or data files. It uses built-in logic to determine timezones based on geographic position, making it ideal for offline applications. The package is lightweight and efficient, suitable for apps needing accurate timezone detection from location data. It supports all major platforms including mobile, web, and desktop.

Use cases

  • Offline timezone detection
  • Location-based app features
  • Travel or scheduling apps
  • Timezone-aware data processing
  • Real-time location tracking

Key features

  • No external dependencies
  • Works offline
  • Cross-platform support
  • Accurate timezone mapping
  • Lightweight and fast

Suitable for

  • Mobile and web apps
  • Apps requiring privacy
  • Offline-first applications
  • Geolocation tools
  • Developers avoiding API calls

Considerations

  • Limited to known timezone boundaries
  • May not reflect recent political changes
  • Does not handle daylight saving automatically
  • Accuracy depends on internal data precision
  • Not suitable for high-precision geospatial analysis

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

latLngToTimezone

Lat/long to timezone mapper in Dart. Does not require web services or data files

The "lat/long to timezone polygon mapping" is hardcoded, and we hope this rarely changes, but the changes to offsets and daylight savings changeover dates etc. (which are more frequent) are taken care of by your system libraries and so these are automatically kept up-to-date. From time to time, someone updates the files with the latest timezone polygons, but these rarely change...I think the most recent change is the Crimean peninsular.

This Dart library is port of the original project
available at https://github.com/drtimcooper/LatLongToTimezone. Ported it to Dart to make it easily available on pub.dev. In order to support updates from the upstream version, the formatting was changed as little as possible (specifically not adding control flow braces or truncating lines at 80 characters).

Usage

See the example at pub.dev.

Categories

Source repository

Projects using this package