bug-mcron
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-mcron] tests/job-specifier.scm vs. TZ


From: Mathieu Lirzin
Subject: Re: [Bug-mcron] tests/job-specifier.scm vs. TZ
Date: Mon, 09 Apr 2018 00:26:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello ludo,

address@hidden (Ludovic Courtès) writes:

> Thanks for the 1.1.1 release!

Thank you for your helpful testing and feedback which lead to it.  :-)

I intended to mention your valuable contribution in the release
announcement but forgot about it during the process which I am still not
comfortable with.  Sorry about that.

> Looks like tests/job-specifier.scm has a timezone issue, though.  It
> expects to be running at UTC-2 (aka. CEST).  But even then, there’s
> something wrong:

OK

> test-name: next-year
> location: ./tests/job-specifier.scm:60
> source:
> + (test-equal
> +   "next-year"
> +   (list 59989762800 1546293600)
> +   (list (next-year '(1971))
> +         (next-year-from 1522095469)))
> expected-value: (59989762800 1546293600)
> actual-value: (59989759200 1546293600)
> result: FAIL
>
> test-name: next-month
> location: ./tests/job-specifier.scm:65
> source:
> + (test-equal
> +   "next-month"
> +   (list 28854000 5094000)
> +   (list (next-month '(11))
> +         (next-month-from 101 '(0 2 4))))
> expected-value: (28854000 5094000)
> actual-value: (28850400 5090400)
> result: FAIL
>
> test-name: next-day
> location: ./tests/job-specifier.scm:70
> source:
> + (test-equal
> +   "next-day"
> +   (list 2588400 342000)
> +   (list (next-day '(31))
> +         (next-day-from 4337 '(0 5 10))))
> expected-value: (2588400 342000)
> actual-value: (2584800 338400)
> result: FAIL
>
> test-name: next-hour
> location: ./tests/job-specifier.scm:75
> source:
> + (test-equal
> +   "next-hour"
> +   '(3600 82800 3600)
> +   (list (next-hour)
> +         (next-hour '(0))
> +         (next-hour-from 3 '(0 1 2 3 4))))
> expected-value: (3600 82800 3600)
> actual-value: (3600 79200 3600)
> result: FAIL
>
> It looks like the ‘-from’ variants honor TZ whereas the others don’t,
> or something like that.
>
> Ideas?

Seems weird, since ‘(next-... lst)’ is basically equivalent to
‘(next-...-from 0 lst)’.

I will take a closer look tomorrow.

Thanks for the report.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37



reply via email to

[Prev in Thread] Current Thread [Next in Thread]