Timezone constructor
Timezone(
- String name
Creates a Timezone from the name
, typically a TZ database timezone identifier such as Asia/Singapore
, or
factory if the name could not be parsed.
final singapore = Timezone('Asia/Singapore'); // `Asia/Singapore`
final factory = Timezone('invalid'); // `Factory`
Implementation
factory Timezone(String name) => timezoneProvider[name] ?? factory;