formatWithTimeZone static method
Implementation
static String formatWithTimeZone(DateTime date, String timeZone) {
int offset;
try {
offset = int.parse(timeZone);
} catch (e) {
throw ArgumentError('Invalid time zone format');
}
return DateFormat.yMd().add_jm().format(date.toUtc().add(Duration(hours: offset)));
}