diff --git a/src/Files.App/ServicesImplementation/DateTimeFormatter/ApplicationDateTimeFormatter.cs b/src/Files.App/ServicesImplementation/DateTimeFormatter/ApplicationDateTimeFormatter.cs index 050ce8e42265..3c9d2c6d5162 100644 --- a/src/Files.App/ServicesImplementation/DateTimeFormatter/ApplicationDateTimeFormatter.cs +++ b/src/Files.App/ServicesImplementation/DateTimeFormatter/ApplicationDateTimeFormatter.cs @@ -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")}"; } } }