Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make timezone database initialization optional #314

Merged
merged 1 commit into from
Jul 8, 2021
Merged

Make timezone database initialization optional #314

merged 1 commit into from
Jul 8, 2021

Conversation

kightsonsanom
Copy link
Contributor

@kightsonsanom kightsonsanom commented Jul 5, 2021

  1. In case the application initializes its own timezone by setting the local timezone as the current device timezone, it should be possible to omit the initialization of the timezone database so that it doesn't default to UTC.
  2. Update flutter_native_timezone library to the latest 2.0.0 version.

@thomassth
Copy link
Contributor

Nice, didn't think it would be easy to implement.

How does it behave when upgrading from 3.x or the current 4.x prereleases?

ie. how many lines would people need to fix when upgrading

@kightsonsanom
Copy link
Contributor Author

No changes will be required, this is an optional parameter with a default value so the call to DeviceCalendarPlugin() will always initialize the timezone database as before

  factory DeviceCalendarPlugin({bool shouldInitTimezone = true}) {
    if (shouldInitTimezone) {
      tz.initializeTimeZones();
    }
    return _instance;
  }

@thomassth thomassth merged commit d90dbb2 into builttoroam:develop Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants