Once again, I am very excited that the new CTP is available. :) My second feature for Orcas is available to the world! The BCL team has gotten plenty of feedback (as you can see the comments from my BCL post and on this blog...) about needing an object to represent exact point in time! (We do listen!!)

Oh and for those of you who has been reading my blog regularly... this is the third most debated name on the BCL: "DateTimeOffset". I will explain why later this month in my "Desiging DateTimeOffset" posts. Again, a starter guide will be posted on the BCL blog very soon. This time, I think our new PM Justin will be doing it instead of me. I still need to write a "Advance feature for TimeZone2".

 A new date time data structure that can specify an exact point in time relative to the UTC time zone.

  • The current DateTime is insufficient at specifying an exact point in time. DateTimeOffset represents a date time with an offset. It is not meant to be a replacement for DateTime; it should be used in scenarios involving absolute points in time. DateTimeOffset includes most of the functionality of the current DateTime API and allows seamless conversion to DateTime as well.

Again, for my loyal readers here... a little sneak preview

void CreatingADateTimeOffset()

{

 

    DateTime currentDateTime = GetUserDateTime();

    TimeSpan userOffset = GetUserOffset();

    DateTimeOffset pointInTime = new DateTimeOffset(currentDateTime , userOffset);

}