From fe3cbb70729d3b5f708414ab8fbd347f7c29d845 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Fri, 16 Jun 2017 20:32:11 +0800 Subject: [PATCH] Update join date definition. --- osu.Game/Overlays/Profile/ProfileHeader.cs | 13 ++++++++++--- osu.Game/Users/User.cs | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 5fbbd531ce..3471b27fac 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -306,7 +306,7 @@ namespace osu.Game.Overlays.Profile if (user.IsSupporter) supporterTag.Show(); - if(!string.IsNullOrEmpty(user.Colour)) + if (!string.IsNullOrEmpty(user.Colour)) { colourBar.Colour = OsuColour.FromHex(user.Colour); colourBar.Show(); @@ -329,8 +329,15 @@ namespace osu.Game.Overlays.Profile } infoTextLeft.NewParagraph(); - infoTextLeft.AddText("Joined "); - infoTextLeft.AddText(user.JoinDate, boldItalic); + if (user.JoinDate.ToUniversalTime().Year < 2008) + { + infoTextLeft.AddText("Here since the beginning", boldItalic); + } + else + { + infoTextLeft.AddText("Joined "); + infoTextLeft.AddText(user.JoinDate.LocalDateTime.ToShortDateString(), boldItalic); + } infoTextLeft.NewLine(); infoTextLeft.AddText("Last seen "); infoTextLeft.AddText(user.LastVisit.LocalDateTime.ToShortDateString(), boldItalic); diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 99484d8ef3..69a0e9c98b 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -12,8 +12,8 @@ namespace osu.Game.Users [JsonProperty(@"id")] public long Id = 1; - [JsonProperty(@"joinDate")] - public string JoinDate; + [JsonProperty(@"join_date")] + public DateTimeOffset JoinDate; [JsonProperty(@"username")] public string Username;