Skip to content

Commit 21e9a20

Browse files
committed
use utc in fromJson
1 parent 0a3e26c commit 21e9a20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kitchenowl/lib/models/planner.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ DateTime toEndOfDay(DateTime dt) {
1010

1111
class RecipePlan extends Model {
1212
final Recipe recipe;
13-
final DateTime? cooking_date; // privat gemacht
13+
final DateTime? cooking_date;
1414
final int? yields;
1515

1616
RecipePlan({
1717
required this.recipe,
18-
this.cooking_date, // Parameter umbenennen
18+
this.cooking_date,
1919
this.yields,
2020
});
2121

2222
factory RecipePlan.fromJson(Map<String, dynamic> map) {
2323
return RecipePlan(
2424
recipe: Recipe.fromJson(map['recipe']),
25-
cooking_date: DateTime.fromMillisecondsSinceEpoch(map["cooking_date"], isUtc: false),
25+
cooking_date: DateTime.fromMillisecondsSinceEpoch(map["cooking_date"], isUtc: true),
2626
yields: map['yields'],
2727
);
2828
}

0 commit comments

Comments
 (0)