Playing in Flutter, using Dart - I am trying to establish the amount of seconds between two dates.
But for some reason the date1.difference(date2).inSeconds
gives a result that does not make sense to me. Maybe it is late and I am too tired to miss something here:
Here is my code: (i.e. print statements of the dates and its supposed difference in seconds):
print(myDate); // DateTime type
print(queryDate); // DateTime type
print(myDate.difference(queryDate).inSeconds);
And the print-results say:
2019-02-01 00:18:00.000Z // myDate
2019-02-01 01:17:18.859431 // queryDate
41 // supposedly difference in seconds...
But shouldn't it be much more than 41 seconds ????
Could the reason be the x.000Z vs. .859431 format differences ? And if yes, why ?
Why is the difference
method ignoring minutes and hours ?