secondsBetween function
Implementation
int secondsBetween(DateTime from, DateTime to) {
from = DateTime(from.year, from.month, from.day, from.hour, from.minute, from.second);
to = DateTime(to.year, to.month, to.day, to.hour, to.minute, to.second);
return (to.difference(from).inSeconds).round();
}