Skip to content

Commit

Permalink
Merge pull request #13 from budaevb/master
Browse files Browse the repository at this point in the history
utc time fix
  • Loading branch information
InsecureBeast authored Dec 22, 2017
2 parents 6ff1fc2 + 5fbeb85 commit 38cc72e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static string GetAttrValue(DObject obj, string attrName)

private DFile GetFile(long version, DObject obj)
{
var versionUniversalTime = new DateTime(version).ToUniversalTime();
var versionUniversalTime = new DateTime(version);
if (obj.ActualFileSnapshot.Created.Equals(versionUniversalTime) || version == 0)
{
var file = obj.ActualFileSnapshot.Files.FirstOrDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ else
@{
foreach (var snapshot in Model.Snapshots)
{
var snapshotTime = @snapshot.Created.ToLocalTime();
var snapshotTime = @snapshot.Created;
var isActive = "";
var author = Model.GetPersonDisplayName(snapshot.CreatorId);
var reason = "";
if (!string.IsNullOrEmpty(snapshot.Reason))
reason = string.Format("\"{0}\"", snapshot.Reason);
if (Model.VersionTime.Equals(snapshotTime))
if (Model.VersionTime.Equals(snapshotTime.ToLocalTime()))
{
isActive = "active";
}
<li class="list-group-item @isActive"><a href="@Url.Action("Index", "Files", new {id = Model.Id, version = snapshotTime.Ticks})">Версия @snapshotTime @author @reason </a></li>
<li class="list-group-item @isActive"><a href="@Url.Action("Index", "Files", new {id = Model.Id, version = snapshotTime.Ticks})">Версия @snapshotTime.ToLocalTime() @author @reason </a></li>
}
}
</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.6-*",
"version": "0.0.7-*",
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
Expand Down

0 comments on commit 38cc72e

Please sign in to comment.