In this case, it does not matter.
Inside, the first thing .SetExpires does is convert the time you set to UTC before setting it to a cookie.
Remember that as long as your datetime consumer uses the DateTime class correctly, the two are the same - it's just โbasicโ for UTC, and the other is not:
20110701T14:00:00-1:00 (British Summer Time)
and
20110701T13:00:00+0:00 (UTC)
represent exactly the same time and time, namely 1pm UTC.
As long as the consumer processes correctly (which seems to be by looking into the reflector), this does not matter.
If you take this and pass it as a time string, then of course it may matter, but not in this case.
You can see the effect with the following code (if you are not in UTC on your own - if you are - change your settings to check!). They both output the same time as soon as you asked him to convert to UTC.
WriteDateTime(DateTime.Now); WriteDateTime(DateTime.UtcNow); public static void WriteDateTime(DateTime dateTime) { Console.WriteLine(dateTime.ToUniversalTime().ToLongTimeString()); }
Rob Levine Jan 31 '11 at 11:07 2011-01-31 11:07
source share