mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 21:18:40 +00:00
fixing timezone issue
This commit is contained in:
parent
6d9df0328d
commit
c563a09f43
1 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ class MessageJson {
|
||||||
messageId: (json['messageId'] as num?)?.toInt(),
|
messageId: (json['messageId'] as num?)?.toInt(),
|
||||||
content: MessageContent.fromJson(
|
content: MessageContent.fromJson(
|
||||||
kind, json['content'] as Map<String, dynamic>),
|
kind, json['content'] as Map<String, dynamic>),
|
||||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
timestamp: DateTime.fromMillisecondsSinceEpoch(json['timestamp']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ class MessageJson {
|
||||||
'kind': kind.name,
|
'kind': kind.name,
|
||||||
'content': content?.toJson(),
|
'content': content?.toJson(),
|
||||||
'messageId': messageId,
|
'messageId': messageId,
|
||||||
'timestamp': timestamp.toIso8601String(),
|
'timestamp': timestamp.toUtc().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue