flutter_timezone
5.1.1A flutter plugin for getting the local timezone of the device.
Readme
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
Changelog
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
5.1.1 - 2026-10-03
Fixed
- Avoid Flutter's regex based plugin apply warning (#66) Thanks @CooperWolfe.
- Support equatable 3.0.0+
5.1.0 - 2026-05-28
Added
- Support for Android Gradle Plugin 9.x. Thanks @giaquo.
- Release script
Fixed
- Adhere to "Keep a Changelog" format
- Use lint rules from wolverinebeach_lints
5.0.2 - 2026-03-15
Fixed
5.0.1
Fixed
- macOS localized timezone name retrieval on OSX 13+.
5.0.0
Changed
- Breaking: API return values are now
TimezoneInfoobjects containing both the timezone name and, on supported platforms, the localized timezone name. - Minimum macOS version bumped to 10.14 (#50). Thanks @bqubique.
4.1.1
Fixed
- Linux: don't always return
true.
4.1.0
Added
4.0.0
Added
Changed
- Breaking: On Android, this plugin now requires Java 17 (#42). Thanks @kuhnroyal.
3.0.1
Removed
- Leftover reference to v1 Android embedding API (#35).
3.0.0
Added
- Fetch a list of all available time zones on web in browsers that support it (#34). Thanks @HosamHasanRamadan.
Changed
- Breaking: Removed support for the old Android v1 embedding API which is no longer supported in Flutter > 3.24.x (#35).
Fixed
2.1.0
Added
- Windows support.
2.0.1
Removed
- Unused dependencies.
2.0.0
Changed
- Support for Wasm compilation. Updated to use the new web and
js_interoplibraries; Flutter 3.22.0 or later is now required.
1.0.8
Changed
-
Android: bump Kotlin version to 1.6.21. Fixes #15.
Note: this version may require running a Gradle clean BEFORE you upgrade.
1.0.7
Fixed
- Android: set JVM target to Java 8 for Kotlin language. Fixes #10.
1.0.6
Fixed
- Re-add lost example file.
1.0.5
Added
- Support for Android Gradle Plugin version 8.
1.0.4
Changed
- Revert Android
minSDKVersionto 16 since calls to newer APIs are guarded.
1.0.3
Added
- macOS support.
1.0.2
Added
- Web support.
1.0.1
Changed
- Change package name to
net.wolverinebeach.
Fixed
- iOS example app.
- Method channel name typo on iOS.
1.0.0
Added
- Initial release as
flutter_timezone, built on top of flutter_native_timezone v2.0.1 with the following changes cherry-picked:
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add flutter_timezonepubspec.yaml
name: flutter_timezone
description: A flutter plugin for getting the local timezone of the device.
version: 5.1.1
homepage: https://github.com/tjarvstrand/flutter_timezone
environment:
sdk: '>=3.4.0 <4.0.0'
flutter: ">=3.22.0"
dependencies:
equatable: '>=2.1.0 <4.0.0'
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
meta: ^1.16.0
dev_dependencies:
flutter_lints: ^6.0.0
flutter_test:
sdk: flutter
wolverinebeach_lints:
git:
url: git@github.com:tjarvstrand/wolverinebeach_dart_util.git
ref: main
path: packages/wolverinebeach_lints
# The following section is specific to Flutter.
flutter:
plugin:
platforms:
android:
package: net.wolverinebeach.flutter_timezone
pluginClass: FlutterTimezonePlugin
ios:
pluginClass: FlutterTimezonePlugin
linux:
pluginClass: FlutterTimezonePlugin
macos:
pluginClass: FlutterTimezonePlugin
windows:
pluginClass: FlutterTimezonePluginCApi
web:
pluginClass: FlutterTimezonePlugin
fileName: flutter_timezone_web.dart
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | On demand | Download | 2caa34bd…a242ec |
| 1.0.1 | On demand | Download | 17a24878…e5daff |
| 1.0.2 | On demand | Download | 91d0c955…6b06b0 |
| 1.0.3 | On demand | Download | 9588f690…5b68b2 |
| 1.0.4 | On demand | Download | 8f831a31…50d267 |
| 1.0.5 | On demand | Download | b4d09d47…59ed51 |
| 1.0.6 | On demand | Download | 9b179c76…ee1a3c |
| 1.0.7 | On demand | Download | 4508018a…083e68 |
| 1.0.8 | On demand | Download | 06b35132…05fb24 |
| 2.0.0 | On demand | Download | b7448ff8…66f03f |
| 2.0.1 | On demand | Download | f9c328f6…936120 |
| 2.1.0 | On demand | Download | 0cb5498d…c14686 |
| 3.0.0 | On demand | Download | 06150cc6…fadffa |
| 3.0.1 | On demand | Download | ea53c61c…446892 |
| 4.0.0 | On demand | Download | 6e6a0a9d…eb5a5f |
| 4.1.0 | On demand | Download | bc286cec…f84b64 |
| 4.1.1 | On demand | Download | 13b2109a…85d934 |
| 5.0.0 | On demand | Download | ccad42fb…b8e649 |
| 5.0.1 | On demand | Download | 978192f2…f0cb3c |
| 5.0.2 | On demand | Download | e8d63f50…bb01c2 |
| 5.1.0 | On demand | Download | 86967742…30b073 |
| 5.1.1 | Cached · Upstream SHA-256 matched | Download | 7830bc64…410d68 |
Dependencies
equatable "\u003e=2.1.0 \u003c4.0.0"
flutter {
"sdk": "flutter"
}
flutter_web_plugins {
"sdk": "flutter"
}
meta "^1.16.0"