TZDateTime constructor

TZDateTime(
  1. Location location,
  2. int year, [
  3. int month = 1,
  4. int day = 1,
  5. int hour = 0,
  6. int minute = 0,
  7. int second = 0,
  8. int millisecond = 0,
  9. int microsecond = 0,
])

Constructs a TZDateTime instance specified at location time zone.

For example, to create a new TZDateTime object representing April 29, 2014, 6:04am in America/Detroit:

final detroit = getLocation('America/Detroit');

final annularEclipse = TZDateTime(location,
    2014, DateTime.APRIL, 29, 6, 4);

Implementation

TZDateTime(Location location, int year,
    [int month = 1,
    int day = 1,
    int hour = 0,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0])
    : this.from(
          _utcFromLocalDateTime(
              DateTime.utc(year, month, day, hour, minute, second,
                  millisecond, microsecond),
              location),
          location);