Skip to content

Time is off by timezone offset from utc on iOS #228

@shatanikmahanty

Description

@shatanikmahanty

I have been using this package from a longtime. But in timezone Asia/Beirut a frequent issue happens where time shows 3 hrs behind when using tz.TZDateTime.now(tz.local); or any other date time related operation which uses local timezone.

I am explicitly setting tz.setLocalLocation to required location Asia/Beirut

For my example throughout package is imported like this: import 'package:timezone/timezone.dart' as tz;

Timezone library is initialized twice in app. Once in main and again in fcm_background_handler.dart for background notifications.

Update: It seems when timezone is initialized in fcm background callback the app local changes for ios only. For android the behavior is not seen at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions