Hi, I am @etainclub who develops several apps for steem.
I have just started to run a witness node. Please vote for me here.
https://steemitwallet.com/~witnesses
@etainclub
I developed the wallet screen but the time computation drove me crazy. It took many hours to find a workaround.
(Oh, the US dollar in the top center is not real.)
A dropdown menu will appear when clicking each menu below:
Transfer History
Here there is 'time ago' in each list, which was not working well in Dart's DateTime.difference.
- This is not working
final createdAt =DateTime.utc(2021, 10, 15, 0, 0, 0);
final nowUTC = DateTime.now().toUtc();
final diff = nowUTC.difference(createdAt)
// in which the diff is not correct even though the nowUTC is a correct time in UTC. very strange!
I had to find this workaround using time zone offset.
- This is a workaround
final createdAt =DateTime.utc(2021, 10, 15, 0, 0, 0);
final nowUTC = DateTime.now().subtract(DateTime.now().timeZoneOffset);
final diff = nowUTC.difference(createdAt);
I spend so much time to display 'time ago'!! Let's go forward!
Resteem / Vote / Comment / Follow / Support
This project will Make STEEM Great Again! I, the developer of PLAY STEEM mobile app, am doing my best to bring people to the STEEM ecosystem.
Thank you for your support.
@steemcurator01
Vote for Witness
https://steemitwallet.com/~witnesses
@etainclub
Upvoted! Thank you for supporting witness @jswit.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I'm still following and waiting for the release date.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit