- 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
This commit is contained in:
suhacan
2009-12-03 02:28:01 +00:00
parent 6e36ef09b2
commit 54888399ec
5 changed files with 5 additions and 5 deletions

View File

@@ -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,

View File

@@ -72,7 +72,7 @@
<%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ...
<% } %>
</td>
<td><%= commentEntry.Comment.CommentDate %></td>
<td><%= commentEntry.Comment.CommentDate.ToLocalTime() %></td>
<td>
<%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> |
<%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}) %>

View File

@@ -64,7 +64,7 @@
<%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ...
<% } %>
</td>
<td><%= commentEntry.Comment.CommentDate %></td>
<td><%= commentEntry.Comment.CommentDate.ToLocalTime() %></td>
<td>
<%=Html.ActionLink(commentEntry.CommentedOn, "Details", new {id = commentEntry.Comment.CommentedOn}) %>
</td>

View File

@@ -7,7 +7,7 @@
<%= comment.CommentText %>
</li>
<li>
Posted by <%= comment.UserName %> on <%= comment.CommentDate %>
Posted by <%= comment.UserName %> on <%= comment.CommentDate.ToLocalTime() %>
</li>
<li>
<%=Html.ActionLink("Delete", "Delete", new {Area="Orchard.Comments", Controller="Admin", id = comment.Id, returnUrl = Context.Request.Url}) %>

View File

@@ -8,7 +8,7 @@
<%= Html.Hidden("TaggedContentId", Model.ContentItem.Id) %>
<%= Html.Hidden("ReturnUrl", Context.Request.Url) %>
<h3>Add a new tag</h3>
<h3>Add new tags</h3>
<ol>
<li>
<input id="NewTagName" class="inputText inputTextLarge" name="NewTagName" type="text" value="" />