fixed the wrong time display
This commit is contained in:
parent
3e99fc67a3
commit
ee9c94dc86
@ -461,8 +461,6 @@ class _Logs extends StatelessWidget {
|
|||||||
final Color Function(String) colorParser;
|
final Color Function(String) colorParser;
|
||||||
const _Logs({required this.logs, required this.colorParser});
|
const _Logs({required this.logs, required this.colorParser});
|
||||||
|
|
||||||
DateTime _parseTimestamp(DateTime ts) => ts;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (logs.isEmpty) {
|
if (logs.isEmpty) {
|
||||||
@ -496,7 +494,9 @@ class _Logs extends StatelessWidget {
|
|||||||
'${updatedBy.lastName.isNotEmpty == true ? updatedBy.lastName[0] : ''}';
|
'${updatedBy.lastName.isNotEmpty == true ? updatedBy.lastName[0] : ''}';
|
||||||
final name = '${updatedBy.firstName} ${updatedBy.lastName}';
|
final name = '${updatedBy.firstName} ${updatedBy.lastName}';
|
||||||
|
|
||||||
final timestamp = _parseTimestamp(log.updatedAt);
|
final timestamp = log.updatedAt
|
||||||
|
.toUtc()
|
||||||
|
.add(const Duration(hours: 5, minutes: 30));
|
||||||
final timeAgo = timeago.format(timestamp);
|
final timeAgo = timeago.format(timestamp);
|
||||||
|
|
||||||
final nextStatusColor = colorParser(log.nextStatus.color);
|
final nextStatusColor = colorParser(log.nextStatus.color);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user