> /// The time zone name. /// /// This value is provided by the
> operating system and may be an /// abbreviation or a full name.
> /// /// In the browser or on Unix-like systems commonly returns
> abbreviations, /// such as "CET" or "CEST". On Windows returns the
> full name, for example /// "Pacific Standard Time".
`external String get timeZoneName;`
>
> /// The time zone offset, which /// is the difference between
> local time and UTC. /// /// The offset is positive for time zones
> east of UTC. /// /// Note, that JavaScript, Python and C return
> the difference between UTC and /// local time. Java, C# and Ruby
> return the difference between local time and /// UTC.
`external Duration get timeZoneOffset;`
`DateTime.now().timeZoneName`
If time instance is in UTC.
`timeInstance.toLocal().timeZoneName`
Moreover,
> /// The DateTime class does not provide internationalization. /// To
> internationalize your code, use /// the
> [intl](
[To see links please register here]
) package.
OR
To get timezone in `Europe/Moscow` format:
From [here][1]: Using [flutter_native_timezone](
[To see links please register here]
)
final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone();
print(currentTimeZone); // Europe/Moscow
[1]:
[To see links please register here]