fixTZ method

DateTime fixTZ(
  1. DateTime dbDate
)

Implementation

DateTime fixTZ(DateTime dbDate) {
  //datetime from database is returned with local value but with tz forced to UTC
  //fix for datetime beeing forced to utc
  return new DateTime.fromMillisecondsSinceEpoch(dbDate
      .subtract(new DateTime.now().timeZoneOffset)
      .millisecondsSinceEpoch);
}