Pleased to see that Dart is quite sane in its API and dates/times carry around the time zone.
I still get frustrated because after many years I still have to deal with date times without a timezone in Python. From the standard library:
>>> import datetime >>> datetime.datetime.now() datetime.datetime(2018, 9, 15, 1, 51, 58, 769069) >>> datetime.datetime.utcnow() datetime.datetime(2018, 9, 14, 23, 52, 4, 568886) >>> datetime.datetime.now().isoformat() '2018-09-15T01:52:14.024139' >>> datetime.datetime.utcnow().isoformat() '2018-09-14T23:52:23.090149'
Neither the local time, now(), nor the UTC time carry the time zone so if you pass that around you're bound to mess it up, they call those "naive datetimes" vs "time zone aware datetimes" but I call them "useless datetimes" :D
now()
No wonder Python has so many datetime libraries (each word links to a different library :D)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Pleased to see that Dart is quite sane in its API and dates/times carry around the time zone.
I still get frustrated because after many years I still have to deal with date times without a timezone in Python. From the standard library:
Neither the local time,
now()
, nor the UTC time carry the time zone so if you pass that around you're bound to mess it up, they call those "naive datetimes" vs "time zone aware datetimes" but I call them "useless datetimes" :DNo wonder Python has so many datetime libraries (each word links to a different library :D)