getUtcTimeZoneIdentifier method

  1. @override
Future<String> getUtcTimeZoneIdentifier()
override

Returns the identifier for the UTC time zone.

The identifier for the UTC time zone is a string in the format "Etc/GMT+/-hh:mm", where "+/-hh:mm" represents the time zone offset from UTC. For example, the identifier for the UTC time zone commonly is "UTC".

This method returns a Future that resolves to a String value containing the UTC time zone identifier.

Implementation

@override
Future<String> getUtcTimeZoneIdentifier() async {
  final String utcIdentifier = await methodChannel
      .invokeMethod(CHANNEL_METHOD_GET_UTC_TIMEZONE_IDENTIFIER);
  return utcIdentifier;
}