Skip to content

Commit

Permalink
fixed error with DateTime parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
pavan-kalyan committed Dec 25, 2019
1 parent 9db78be commit 3179aaa
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
47 changes: 47 additions & 0 deletions assets/kontests-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions lib/Contest.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class Contest {
return Contest(
name: json['name'],
url: json['url'],
start_time: new DateFormat("yyyy-mm-ddThh:mm:ss.SSSZ")
start_time: new DateFormat("yyyy-MM-ddThh:mm:ss.SSSZ")
.parseUtc(json['start_time']),
end_time:
new DateFormat("yyyy-mm-ddThh:mm:ss.SSSZ").parseUtc(json['end_time']),
new DateFormat("yyyy-MM-ddThh:mm:ss.SSSZ").parseUtc(json['end_time']),
duration: json['duration'],
site: json['site'],
in_24_hours: within_24,
Expand Down
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ class _ContestListState extends State<ContestList>
title: Text(snapshot.data.contests[index].name),
onTap: () => launch(snapshot.data.contests[index].url),
subtitle: Text(startDateTime.day.toString() +
'/' +
startDateTime.month.toString() +
' ' +
timepicked.hourOfPeriod.toString() +
':' +
timepicked.minute.toString() +
Expand Down

0 comments on commit 3179aaa

Please sign in to comment.