From 54888399ecc3e0e5739c95ab924ae2969380b600 Mon Sep 17 00:00:00 2001 From: suhacan Date: Thu, 3 Dec 2009 02:28:01 +0000 Subject: [PATCH] - Fixing instances storing dates as local time instead of UTC. The overall time management strategy will be implemented when we come to localization... --HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043005 --- .../Packages/Orchard.Comments/Controllers/AdminController.cs | 2 +- .../Packages/Orchard.Comments/Views/Admin/Details.aspx | 2 +- .../Packages/Orchard.Comments/Views/Admin/Index.aspx | 2 +- .../Views/Models/EditorTemplates/HasComments.ascx | 2 +- .../Orchard.Tags/Views/Models/DisplayTemplates/HasTags.ascx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Orchard.Web/Packages/Orchard.Comments/Controllers/AdminController.cs b/src/Orchard.Web/Packages/Orchard.Comments/Controllers/AdminController.cs index f7daca95d..650399fe5 100644 --- a/src/Orchard.Web/Packages/Orchard.Comments/Controllers/AdminController.cs +++ b/src/Orchard.Web/Packages/Orchard.Comments/Controllers/AdminController.cs @@ -120,7 +120,7 @@ namespace Orchard.Comments.Controllers { } Comment comment = new Comment { Author = viewModel.Name, - CommentDate = DateTime.Now, + CommentDate = DateTime.UtcNow, CommentText = viewModel.CommentText, Email = viewModel.Email, SiteName = viewModel.SiteName, diff --git a/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Details.aspx b/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Details.aspx index c90cb2897..914332eef 100644 --- a/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Details.aspx +++ b/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Details.aspx @@ -72,7 +72,7 @@ <%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ... <% } %> - <%= commentEntry.Comment.CommentDate %> + <%= commentEntry.Comment.CommentDate.ToLocalTime() %> <%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> | <%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}) %> diff --git a/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Index.aspx b/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Index.aspx index 05064b7c8..90a191111 100644 --- a/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Index.aspx +++ b/src/Orchard.Web/Packages/Orchard.Comments/Views/Admin/Index.aspx @@ -64,7 +64,7 @@ <%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ... <% } %> - <%= commentEntry.Comment.CommentDate %> + <%= commentEntry.Comment.CommentDate.ToLocalTime() %> <%=Html.ActionLink(commentEntry.CommentedOn, "Details", new {id = commentEntry.Comment.CommentedOn}) %> diff --git a/src/Orchard.Web/Packages/Orchard.Comments/Views/Models/EditorTemplates/HasComments.ascx b/src/Orchard.Web/Packages/Orchard.Comments/Views/Models/EditorTemplates/HasComments.ascx index ed051654a..63b2e2f99 100644 --- a/src/Orchard.Web/Packages/Orchard.Comments/Views/Models/EditorTemplates/HasComments.ascx +++ b/src/Orchard.Web/Packages/Orchard.Comments/Views/Models/EditorTemplates/HasComments.ascx @@ -7,7 +7,7 @@ <%= comment.CommentText %>
  • - Posted by <%= comment.UserName %> on <%= comment.CommentDate %> + Posted by <%= comment.UserName %> on <%= comment.CommentDate.ToLocalTime() %>
  • <%=Html.ActionLink("Delete", "Delete", new {Area="Orchard.Comments", Controller="Admin", id = comment.Id, returnUrl = Context.Request.Url}) %> diff --git a/src/Orchard.Web/Packages/Orchard.Tags/Views/Models/DisplayTemplates/HasTags.ascx b/src/Orchard.Web/Packages/Orchard.Tags/Views/Models/DisplayTemplates/HasTags.ascx index 8696edf84..a795b446b 100644 --- a/src/Orchard.Web/Packages/Orchard.Tags/Views/Models/DisplayTemplates/HasTags.ascx +++ b/src/Orchard.Web/Packages/Orchard.Tags/Views/Models/DisplayTemplates/HasTags.ascx @@ -8,7 +8,7 @@ <%= Html.Hidden("TaggedContentId", Model.ContentItem.Id) %> <%= Html.Hidden("ReturnUrl", Context.Request.Url) %> -

    Add a new tag

    +

    Add new tags