zoned_date 1.0.0 zoned_date: ^1.0.0 copied to clipboard
A starting point for Dart libraries or applications.
zoned_date #
DateTime with timezones.
Usage #
Create #
Interpret DateTime as different zone #
Interpret year, month, day, hour, minute, second, millisecond and microsecond with different time zone.
// Interpret 2018.1.14T17:32 in EST timezone
final time = new ZonedDate.asZone(new DateTime(2018, 1, 14, 17, 32), Timezone.est);
Convert to different zone #
// Convert local current time to EST
final time = new ZonedDate.convertZone(new DateTime.now(), Timezone.est);
Current time at different timezone #
// Convert local current time to EST
final time = new ZonedDate(Timezone.est);