DateTime doesn't have timezone info, only a generic UTC/"Local" indicator.
There is no date- or time-only type in .NET at the time. While the lack of Date
is an inconvenience, the lack of TimeOfDay
is a bigger problem. People are experimenting with Date and TimeOfDay types though at the CoreFX Lab repository.
At the moment you'll have to use the DateTime
class or create your own Date
class. Even the SQL Server ADO.NET provider doesn provide a date or time only class.
Of course you can always "borrow" the MIT-licensed experimental Date implementation from CoreFX Lab.
NOTE
I understand the pain and the need as I work on air travel related software. Having to work with timezones when I only want to compare against a date is really tiresome. Things begin to really ---- though when I need to convert between Json and DateTime to pass date only values.