I start to use intl package in my dart project. After start to use this package i use this code:
DateTime now = new DateTime.now();
var formatter = new DateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
String nowFormatted = formatter.format(now);
And it works correctly. After i use intl i obtain this message in log:
Uncaught LocaleDataException: Locale data has not been initialized, call initializeDateFormatting(<locale>).
I cannot understand why i should pass locale in this code snippet