system_timezone

The Motive

I wanted to explore creating an FFI (Foreign Function Interface) plugin and also wanted to create a synchronous API to get the system timezone that supports all platforms.

Example

Get current timezone

final currentTimezone = SystemTimezone.getTimezoneName();

Get list of known timezones

final listOfTimezones = SystemTimezone.getKnownTimezoneNames();

OS Constraints

Credits

  • The source code of flutter_timezone and iana-time-zone packages was instrumental in the development of this package.
  • UTM was invaluable for testing this package on Windows and Linux environments.

Libraries

system_timezone