diff options
Diffstat (limited to 'Juick/ViewModels')
-rw-r--r-- | Juick/ViewModels/PostItem.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Juick/ViewModels/PostItem.cs b/Juick/ViewModels/PostItem.cs index 97935b3..88f6b86 100644 --- a/Juick/ViewModels/PostItem.cs +++ b/Juick/ViewModels/PostItem.cs @@ -1,6 +1,8 @@ using System; using System.Net; using JuickApi; +using Juick.Classes; +using System.Globalization; namespace Juick.ViewModels { @@ -11,8 +13,11 @@ namespace Juick.ViewModels MID = message.Mid; RID = message.Rid; Username = message.User.UName; - Status = string.Format("Posted on: {0}, replies: {1}", message.Timestamp, message.Replies); - + // Juick timestamp in utc: 2013-04-22 13:14:30 + var timestamp = DateTime.ParseExact(message.Timestamp, "yyyy-MM-dd HH:mm:ss", null); + Status = string.Format("{0}", DateHelper.PrettyDate(timestamp.ToLocalTime())); + if (message.Replies > 0) + Status = string.Format("{0}, replies: {1}", Status, message.Replies); MessageText = HttpUtility.HtmlDecode(message.Body); if (message.Tags != null) |