Skip to content

Commit

Permalink
Merge pull request #26526 from bdach/fix-date-display-failing
Browse files Browse the repository at this point in the history
Fix date failing to display on leaderboard for some scores with weird datetimes
  • Loading branch information
peppy committed Jan 14, 2024
2 parents fc1cef1 + baf3867 commit a8b301c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osu.Game/Extensions/TimeDisplayExtensions.cs
Expand Up @@ -59,7 +59,8 @@ public static LocalisableString ToFormattedDuration(this TimeSpan timeSpan)
/// <returns>A short relative string representing the input time.</returns>
public static string ToShortRelativeTime(this DateTimeOffset time, TimeSpan lowerCutoff)
{
if (time == default)
// covers all `DateTimeOffset` instances with the date portion of 0001-01-01.
if (time.Date == default)
return "-";

var now = DateTime.Now;
Expand Down

0 comments on commit a8b301c

Please sign in to comment.