logbook-card icon indicating copy to clipboard operation
logbook-card copied to clipboard

Time calculation problem

Open septeven opened this issue 4 years ago • 1 comments

I'm trying your card - there is a problem with the time ago calculation.

First, it doesn't take in consideration the days... Problem is :

  • if it is 5:15am and the event is 5:10am yesterday, your card shows '5m' instead of '1 day 5m' or '24h 01m' etc...

Second, probably because my setup in 24-hour time... Problem is :

  • if it is 18:00 (6pm) and the event is 18:00 yesterday, your card shows 12h (because I guess it refers to 6am...)

Definitely need a fix about it, and definitely need this improvement

septeven avatar Feb 28 '20 17:02 septeven

Hi,

I don't have this issue on my HA. I'm on 24 hour time too (France).

What is the configuration of your card ?

Is it the first event of the period? I know that the first duration can be wrong. When I get history for a period of time (ex: 5 days, default is 1) it gives you the start date of the period and not the start date of the event, so the calculation is wrong ...

If it is possible can you give me the raw values ? Using your browser devtools ( in the network tab, it should be something starting by history/period/)

royto avatar Feb 28 '20 21:02 royto

closing as no update since 2 years ...

royto avatar Jan 19 '23 20:01 royto