date '+scale=2;((%H*60+%M)*60+%S.%N)/8640' | bc
date '+scale=2;((%H*60+%M)*60+%S.%N)/8640' | bc
RE: https://velocipederider.com/@ruari/116353002501207638
In case anyone wanted to know how I set my watch. 😉
Or I can use my other watch to set this one. 🤷
RE: https://velocipederider.com/@ruari/115475170910895200
@mherbert It was the shortest oneliner I have come up with so far to present the time in decimal for when I have to set my watch.
Though if I am truely honest I would usually just load
Or these days I also have a Garmin that can display in decimal time and that updates automatically, so I can just read it off that.
@mherbert Speaking of UTC offsets and decimal time. I also have @dailyprogress, though has no offset runs in reverse (count down).
I use it more for a way to understand how far I have done back through my feed. I did not have to do that decimally but percentages are fun and they are decimal, so 🤷
@mherbert Yeah thinking out the logic is
1. Fun
2. Helps me to really understand what I want to achieve and helps to visualise what I am working with.
@ruari well ... I thought it would not make any difference, but it does:
$ date -Iseconds
2026-04-08T22:19:15+10:00
$ date '+scale=2;((%H*60+%M)*60+%S.%N)/8640' | bc
9.30
$ date '+scale=2;((%H*60+%M)*60)/8640' | bc
9.29
@mherbert Very often it will be fine but sometimes it will be off if you do not break down with more precision.
Of course you could argue, what is a decimal minute here or there but then, if you are gonna do this… might as well do it right, right!? 😆
@mherbert And of course I like the idea of being self sufficient.
If decimalnow.com dissappears one day or I break/lose/sell Garmin I will want to be able to be know what the right time is.