mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 11:23:00 +08:00
Convert to Local Time in Date Tooltip
This commit is contained in:
parent
0ec1e1e2d5
commit
b3e83a47a4
@ -65,8 +65,10 @@ namespace osu.Game.Graphics
|
||||
|
||||
public void SetContent(DateTimeOffset date)
|
||||
{
|
||||
dateText.Text = $"{date:d MMMM yyyy} ";
|
||||
timeText.Text = $"{date:HH:mm:ss \"UTC\"z}";
|
||||
DateTimeOffset localDate = date.ToLocalTime();
|
||||
|
||||
dateText.Text = $"{localDate:d MMMM yyyy} ";
|
||||
timeText.Text = $"{localDate:HH:mm:ss \"UTC\"z}";
|
||||
}
|
||||
|
||||
public void Move(Vector2 pos) => Position = pos;
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Graphics
|
||||
if (date == value)
|
||||
return;
|
||||
|
||||
date = value.ToLocalTime();
|
||||
date = value;
|
||||
|
||||
if (LoadState >= LoadState.Ready)
|
||||
updateTime();
|
||||
|
Loading…
Reference in New Issue
Block a user