Search packages, repositories and app categories

Package detailsv5.1.1

flutter_timezone

A flutter plugin for getting the local timezone of the device.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.4M
Likes
344
Pub points
160

Install package

flutter pub add flutter_timezone

Package Overview

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

flutter_timezone is a Flutter plugin that enables apps to retrieve the device's local timezone information across multiple platforms, including Android, iOS, Web, macOS, Windows, and Linux. It provides a simple API to access the current timezone, making it easier to handle time-related operations in a localized manner. This package is particularly useful for applications requiring accurate time zone-aware functionality, such as scheduling, calendar apps, or displaying local time. The plugin leverages native platform APIs to ensure reliable results.

Use cases

  • Displaying local time in user-friendly formats
  • Scheduling events based on user's timezone
  • Building calendar or reminder applications
  • Handling time zone conversions in global apps
  • Ensuring accurate timestamps in multi-region applications

Key features

  • Cross-platform timezone detection
  • Simple and consistent API
  • Supports all major Flutter platforms
  • Relies on native device timezone settings
  • Lightweight and easy to integrate

Suitable for

  • Apps needing accurate local time handling
  • Global applications with users in different regions
  • Time-sensitive applications like calendars and alarms
  • Developers seeking minimal setup for timezone logic
  • Projects requiring native timezone accuracy

Considerations

  • Requires appropriate platform permissions on some systems
  • May not update dynamically if device timezone changes during runtime
  • Limited to reading timezone; does not support setting it
  • Depends on device-level timezone configuration
  • Not suitable for complex time zone calculations beyond retrieval

Original README

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

flutter_timezone

pub package Keep a Changelog v1.1.0

A flutter plugin for getting the local timezone of the OS.

This is a fork of the original flutter_native_timezone due to lack of maintenance of that package.

Getting Started

Install this package and everything good will just follow along with you.

Usage examples

Get the timezone
final TimezoneInfo currentTimeZone = await FlutterTimezone.getLocalTimezone();
Localized timezone names

On supported platforms Timezone info will contain the localized timezone name. Currently, this is supported on:

  • Android
  • MacOS
  • iOS

Reference

Wikipedia's list of TZ database names

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package