mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:48:41 +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(),
|
||||
content: MessageContent.fromJson(
|
||||
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,
|
||||
'content': content?.toJson(),
|
||||
'messageId': messageId,
|
||||
'timestamp': timestamp.toIso8601String(),
|
||||
'timestamp': timestamp.toUtc().millisecondsSinceEpoch,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue