getCurrentDateTime method

String getCurrentDateTime()

Implementation

String getCurrentDateTime() {

 var dateTime = DateFormat("yyyy-MM-dd HH:mm:ss").parse(DateTime.now().toString(), false);
  var dateLocal = dateTime.toLocal();
  Log("DateTime").i("Date $dateLocal");

  var f = DateFormat('EEE, d MMM yyyy HH:mm:ss');
  var locatDate = "${f.format(DateTime.now().toLocal())} IST";
  Log("DateTime").i("Date $locatDate");
  return locatDate;
}