TimeZoneDefinition.withLocation constructor

TimeZoneDefinition.withLocation(
  1. Location location, {
  2. String? id,
  3. String? name,
  4. int startYear = 1970,
})
Initializes a new instance of the The time zone used to initialize this definition. The Id to use; defaults to the location's name. Exchange identifies time zones by their Windows Id (e.g. "Pacific Standard Time"). The display name to use; defaults to the Id. The first year whose rules are described; earlier years use the first rule.

Implementation

TimeZoneDefinition.withLocation(
  tz.Location location, {
  String? id,
  String? name,
  int startYear = 1970,
}) {
  _InitializeFromRules(
    id ?? location.name,
    name ?? id ?? location.name,
    TimeZoneRuleConverter.FromLocation(location, startYear: startYear),
  );
}