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

Always use UTC time #66

Closed
Tratcher opened this issue Jul 28, 2015 · 4 comments
Closed

Always use UTC time #66

Tratcher opened this issue Jul 28, 2015 · 4 comments
Assignees
Milestone

Comments

@Tratcher
Copy link
Member

Ported from: http://katanaproject.codeplex.com/SourceControl/network/forks/uecasm/LastModified/contribution/8369#!/tab/changes

https://github.com/aspnet/StaticFiles/blob/dev/src/Microsoft.AspNet.StaticFiles/StaticFileContext.cs#L137

LastModified from the file info might be in local time. We should convert it to UTC before attempting any comparisons.

The switch to strongly typed headers at least fixed the header value output: https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs#L239

@Tratcher Tratcher added the bug label Jul 28, 2015
@uecasm
Copy link

uecasm commented Jul 29, 2015

The timezone offset of _lastModified is retained, so in theory it should do comparisons correctly regardless of whether they're local or universal. Though it wouldn't hurt to confirm that as I haven't used DateTimeOffset much myself.

@muratg
Copy link

muratg commented Jan 12, 2016

@Tratcher Are we doing this in RC2?

@Tratcher
Copy link
Member Author

Yes, we should do it.

@BrennanConroy
Copy link
Member

e05469a

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants