diff --git a/lib/parse_server_sdk.dart b/lib/parse_server_sdk.dart index 865958e86..5a4775a4e 100644 --- a/lib/parse_server_sdk.dart +++ b/lib/parse_server_sdk.dart @@ -18,6 +18,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:uuid/uuid.dart'; import 'package:web_socket_channel/io.dart'; import 'package:xxtea/xxtea.dart'; +import 'package:flutter_native_timezone/flutter_native_timezone.dart'; part 'package:parse_server_sdk/src/objects/response/parse_error_response.dart'; part 'package:parse_server_sdk/src/objects/response/parse_exception_response.dart'; diff --git a/lib/src/objects/parse_installation.dart b/lib/src/objects/parse_installation.dart index 008ed79f6..381ad4ce9 100644 --- a/lib/src/objects/parse_installation.dart +++ b/lib/src/objects/parse_installation.dart @@ -82,8 +82,9 @@ class ParseInstallation extends ParseObject { } //Timezone - //TODO set(keyTimeZone, ); - + final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone(); + set(keyTimeZone, currentTimeZone); + //App info final PackageInfo packageInfo = await PackageInfo.fromPlatform(); set(keyAppName, packageInfo.appName); diff --git a/pubspec.yaml b/pubspec.yaml index edc26499a..6c598f2fb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,6 +18,7 @@ dependencies: sembast: ^1.15.1 xxtea: ^2.0.2 + flutter_native_timezone: ^1.0.4 # Utils path_provider: ^0.5.0+1