mirror of
https://github.com/osukey/osukey.git
synced 2025-07-29 06:10:03 +09:00
Use DateTimeOffset
This commit is contained in:
@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Preview = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
Preview = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||||
Author = "someone, someone1, someone2, someone3, someone4",
|
Author = "someone, someone1, someone2, someone3, someone4",
|
||||||
FirstImage = "/help/wiki/shared/news/banners/monthly-beatmapping-contest.png",
|
FirstImage = "/help/wiki/shared/news/banners/monthly-beatmapping-contest.png",
|
||||||
PublishedAt = DateTime.Now
|
PublishedAt = DateTimeOffset.Now
|
||||||
}),
|
}),
|
||||||
new NewsCard(new APINewsPost
|
new NewsCard(new APINewsPost
|
||||||
{
|
{
|
||||||
@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Preview = "boom",
|
Preview = "boom",
|
||||||
Author = "user",
|
Author = "user",
|
||||||
FirstImage = "https://assets.ppy.sh/artists/88/header.jpg",
|
FirstImage = "https://assets.ppy.sh/artists/88/header.jpg",
|
||||||
PublishedAt = DateTime.Now
|
PublishedAt = DateTimeOffset.Now
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -21,10 +21,10 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public string FirstImage { get; set; }
|
public string FirstImage { get; set; }
|
||||||
|
|
||||||
[JsonProperty("published_at")]
|
[JsonProperty("published_at")]
|
||||||
public DateTime PublishedAt { get; set; }
|
public DateTimeOffset PublishedAt { get; set; }
|
||||||
|
|
||||||
[JsonProperty("updated_at")]
|
[JsonProperty("updated_at")]
|
||||||
public DateTime UpdatedAt { get; set; }
|
public DateTimeOffset UpdatedAt { get; set; }
|
||||||
|
|
||||||
[JsonProperty("slug")]
|
[JsonProperty("slug")]
|
||||||
public string Slug { get; set; }
|
public string Slug { get; set; }
|
||||||
|
@ -160,9 +160,9 @@ namespace osu.Game.Overlays.News
|
|||||||
{
|
{
|
||||||
public string TooltipText => date.ToString("d MMMM yyyy hh:mm:ss UTCz");
|
public string TooltipText => date.ToString("d MMMM yyyy hh:mm:ss UTCz");
|
||||||
|
|
||||||
private readonly DateTime date;
|
private readonly DateTimeOffset date;
|
||||||
|
|
||||||
public DateContainer(DateTime date)
|
public DateContainer(DateTimeOffset date)
|
||||||
{
|
{
|
||||||
this.date = date;
|
this.date = date;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user