Reputation: 2326
I'm trying to create a time bucket for a query that includes all times for a specific day anywhere where in the world.
I'm having problems getting my base "UTC" time to do my calculations.
I have:
var baseDate = new DateTime(2013, 1, 17);
var minDate = baseDate.AddHours(-12);
var maxDate = baseDate.AddHours(14);
This is wrong, as the new DateTime takes into account my local time zone and not 12 AM UTC on Janurary 17th, 2013.
How do I get baseDate to be 12am UTC on Janurary 17th, 2013?
Upvotes: 2
Views: 104