Skip to content

Commit c98610b

Browse files
committed
fix: date time conversion from epoch
1 parent bc201ee commit c98610b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/src/auth/user_record.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ final _decoder = SnapshotDecoder()
1515
..register<Snapshot, MultiFactorSettings>((s) => MultiFactorSettings._(s))
1616
..register<Snapshot, MultiFactorInfo>((s) => PhoneMultiFactorInfo._(s))
1717
..register<String, DateTime>(
18-
(v) => DateTime.fromMicrosecondsSinceEpoch((num.parse(v) * 1000).toInt()),
18+
(v) => DateTime.fromMicrosecondsSinceEpoch(
19+
(num.parse(v) * 1000 * 1000).toInt()),
1920
format: RegExp('epoch'))
2021
..register<String, DateTime>(
21-
(v) => DateTime.fromMicrosecondsSinceEpoch(num.parse(v).toInt()),
22+
(v) => DateTime.fromMicrosecondsSinceEpoch((num.parse(v) * 1000).toInt()),
2223
format: RegExp('epoch:millis'))
2324
..seal();
2425

0 commit comments

Comments
 (0)