mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-17 14:19:16 +00:00
16 lines
385 B
Dart
16 lines
385 B
Dart
import 'package:timezone/timezone.dart';
|
|
|
|
class TimeZoneSettings {
|
|
factory TimeZoneSettings.fromString(final String string) {
|
|
final Location location = timeZoneDatabase.locations[string]!;
|
|
return TimeZoneSettings(location);
|
|
}
|
|
|
|
TimeZoneSettings(this.timezone);
|
|
final Location timezone;
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'timezone': timezone.name,
|
|
};
|
|
}
|