Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit dc74729

Browse files
committed
More changes to DateTimeOffset
1 parent 35ec5be commit dc74729

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.AspNet.StaticFiles/StaticFileContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ public bool LookupFileInfo()
129129
{
130130
_length = _fileInfo.Length;
131131

132-
DateTime last = _fileInfo.LastModified;
132+
DateTimeOffset last = _fileInfo.LastModified;
133133
// Truncate to the second.
134-
_lastModified = new DateTime(last.Year, last.Month, last.Day, last.Hour, last.Minute, last.Second, last.Kind);
134+
_lastModified = new DateTimeOffset(last.Year, last.Month, last.Day, last.Hour, last.Minute, last.Second, last.Offset);
135135
_lastModifiedString = _lastModified.ToString(Constants.HttpDateFormat, CultureInfo.InvariantCulture);
136136

137137
long etagHash = _lastModified.ToFileTime() ^ _length;

0 commit comments

Comments
 (0)