Skip to content

AutoTimer editors incorrectly handle "Only match between dates" #1405

@Grumpy-Geoff

Description

@Grumpy-Geoff

If an AutoTimer definition is date-restricted then it contains the 'after="date#1"' and 'before="date#2"' conditions.
e.g.

root@beyonwizv2:~# grep Rosehaven /etc/enigma2/autotimer.xml
 <timer name="Rosehaven" match="Rosehaven" enabled="yes" id="82" after="1632931200" before="1633017600" avoidDuplicateDescription="2" searchType="exact" searchCase="sensitive" overrideAlternatives="1">
where the after condition value evaluates to (Perth) -
root@beyonwizv2:~# date --date=@1632931200    ## after
Thu Sep 30 00:00:00 AWST 2021
root@beyonwizv2:~# date --date=@1633017600    ## before
Fri Oct  1 00:00:00 AWST 2021
root@beyonwizv2:~#

The AutoTimer GUI editor shows for that definition -
"Not before - 30 Sep 2021
Not after - 01 Oct 2021"

With regard to the "after/before" (displayed - not before/not after) dates above, the OWIF Classic and Modern editors have different problems with the "Only match between dates" handling.

Classic editor:
In the above case the Classic editor displays these dates incorrectly reversed as -
"Only match between dates: To date: 30.09.2021 From date: 01.10.2021"
If the date is changed, it will usually fail with an error as the OWIF editor treats them as labeled.

Modern editor:
The modern editor handles this a bit better, but still incorrectly, as it displays the dates reduced by one day each -
"From date: 29/09/2021 To date: 30/09/2021"
But if a date is changed then we can see the time has actually been reduced by 16 hours (57,600 secs).
e.g was -
after="1632931200" before="1633017600"
Then after extending the "To date" (only) by a day in the modern editor and saving, it reduces the dates/times by 16 hours -

<timer name="Rosehaven" match="Rosehaven" enabled="yes" id="82" after="1632873600" before="1633046400" offset="5,10" avoidDuplicateDescription="2" searchType="exact" searchCase="sensitive" overridternatives="1" always_zap="1">
root@beyonwizv2:~# date --date=@"1632873600"  ##after
Wed Sep 29 08:00:00 AWST 2021
root@beyonwizv2:~# date --date=@"1633046400"  ##before
Fri Oct  1 08:00:00 AWST 2021
root@beyonwizv2:~#

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoTimers ⏱Specifically related to the AutoTimers pluginBUG 🐞Not working as expectedModern Interface*Only* affects the responsive design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions