Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

DateTime or DateTimeOffset? #6

Closed
Tratcher opened this issue Sep 5, 2014 · 1 comment
Closed

DateTime or DateTimeOffset? #6

Tratcher opened this issue Sep 5, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@Tratcher
Copy link
Member

Tratcher commented Sep 5, 2014

The memory cache uses time-stamps based on DateTime. Security uses DateTimeOffset (and rounds to one second). Which one should memory cache be using and why?

@GrabYourPitchforks

@Tratcher Tratcher self-assigned this Sep 5, 2014
@GrabYourPitchforks
Copy link

General rule of thumb: Public APIs should take DateTimeOffset because that type encourages correct usage patterns. Internally, the data can be stored as a UTC DateTime (or even an Int64) for the sake of performance.

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

No branches or pull requests

2 participants