zoned_date 1.0.0

  • Example
  • Installing
  • Versions
  • 49


DateTime with timezones.



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, Timezone.est);

Current time at different timezone

// Convert local current time to EST
final time = new ZonedDate(Timezone.est);



  • ZonedDate


import 'package:zoned_date/zoned_date.dart';

main() {
  print(new ZonedDate.convertZone(new, Timezone.est));
  print(new ZonedDate(Timezone.est));
  print(new ZonedDate());

  final time = new ZonedDate.make(2018,
      month: 1, day: 14, hour: 1, minute: 15, zone: Timezone.est);
  print(time.add(new Duration(hours: 1)));

1. Depend on it

Add this to your package's pubspec.yaml file:

  zoned_date: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:zoned_date/zoned_date.dart';
Version Uploaded Documentation Archive
1.0.0 Jan 14, 2018 Go to the documentation of zoned_date 1.0.0 Download zoned_date 1.0.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:zoned_date/zoned_date.dart.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
date_format ^1.0.2 1.0.4
Dev dependencies
test ^0.12.0