diff --git a/world_time_app/lib/services/world_time.dart b/world_time_app/lib/services/world_time.dart index 5cb5f96..a060855 100644 --- a/world_time_app/lib/services/world_time.dart +++ b/world_time_app/lib/services/world_time.dart @@ -17,7 +17,7 @@ class WorldTime { // get properties from json String datetime = data['datetime']; - String offset = data['utc_offset'].substring(1,3); + String offset = data['utc_offset'].substring(0,3); // create DateTime object DateTime now = DateTime.parse(datetime); @@ -31,4 +31,4 @@ class WorldTime { } -// WorldTime instance = WorldTime(location: 'Berlin', flag: 'germany.png', url: 'Europe/Berlin'); \ No newline at end of file +// WorldTime instance = WorldTime(location: 'Berlin', flag: 'germany.png', url: 'Europe/Berlin');