Skip to content

Commit

Permalink
Fix: Fixed issue with some date formats not reflecting language setti…
Browse files Browse the repository at this point in the history
…ngs (#12492)
  • Loading branch information
hishitetsu authored May 30, 2023
1 parent 1b24eb0 commit 09b77f1
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ public override string ToLongLabel(DateTimeOffset offset)
if (offset.Year is <= 1601 or >= 9999)
return " ";

var localTime = offset.ToLocalTime();

if (elapsed.TotalDays < 7 && elapsed.TotalSeconds >= 0)
return $"{localTime:D} {localTime:t} ({ToShortLabel(offset)})";
return $"{ToString(offset, "D")} {ToString(offset, "t")} ({ToShortLabel(offset)})";

return $"{localTime:D} {localTime:t}";
return $"{ToString(offset, "D")} {ToString(offset, "t")}";
}
}
}

0 comments on commit 09b77f1

Please sign in to comment.