Closed igoshevski closed 2 weeks ago
# "reference week", used in fugit for cron modulo notation
#
def rweek
@rweek ||=
begin
ref = EtOrbi.make_time('2019-01-01 12:00:00', @zone)
noon = EtOrbi.make_time(strftime('%F 12:00:00'), @zone)
((noon - ref) / WEEK_S).floor + 1
end
end
Hello,
this is by design. Monday 5am in UTC is not the say time point as Monday 5am in Kamchtaka. rweek
as see above takes as reference 2019-01-01 noon in the current zone, not some arbitrary zone.
It is to be expected that the same cron string produces different series of time points when run for different time zones.
Kind regards.
I am exploring the modulo extension in
fugit
when I realized that for different timezones I get different cronnext_time
value.For ex.
I was able to trace the issue back to EtOrbi and the rweek attribute
My understanding is that no matter what the timezone is, rweek should represent the number of weeks from 2019-01-01 til the date in question in the timezone itself. Or maybe I do not understand how this works.
fugit 1.11.0 et-orbi 1.2.11
Thanks!