To answer your first question: no, we only have version history from 1.0.0-beta1 onwards. Though as it turns out, we removed the concept of a static timezone provider in 1.0.0-beta2, so it is covered, albeit briefly:
- Overhaul of how to get a
DateTimeZone
from an ID:
IDateTimeZoneProvider
(SPI for time zones) renamed toIDateTimeZoneSource
, along with similar renaming for the built-in sources- New interface
IDateTimeZoneProvider
aimed at callers, with caching assumed- New class
DateTimeZoneProviders
with static properties to access the built-in providers: TZDB, BCL and default (currently TZDB)- Removed various
DateTimeZone
static methods in favour of always going via anIDateTimeZoneProvider
implementationDateTimeZoneCache
now public and implementsIDateTimeZoneProvider
The equivalent to your code for 1.0 would be:
public static DateTime AdjustTo(this DateTime date, string timeZoneId)
{
if (date == DateTime.MinValue)
return date;
var zone = DateTimeZoneProviders.Bcl[timeZoneId ?? "UTC"];
var dateTime = new ZonedDateTime(Instant.FromDateTimeUtc(date.ToUniversalTime()), zone);
return dateTime.ToDateTimeUnspecified();
}