Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Sep 2019 15:01:14 -0700
From:      Carl Johnson <carlj@peak.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Oddity in calendar output
Message-ID:  <86imq1p1sl.fsf@elm.localnet>
In-Reply-To: <slrnqnd2lv.1p4l.SPAM_TRAP_gmane@vps.jonz.net> (Jonesy via freebsd-questions's message of "Mon, 9 Sep 2019 17:24:15 -0000 (UTC)")
References:  <86ftl6rd7c.fsf@elm.localnet> <D56C43F5-DFAF-4A84-B76E-195A694D6377@boosten.org> <86zhjepi64.fsf@elm.localnet> <slrnqnd2lv.1p4l.SPAM_TRAP_gmane@vps.jonz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonesy via freebsd-questions <freebsd-questions@freebsd.org> writes:

> On Sun, 08 Sep 2019 14:55:15 -0700, Carl Johnson wrote:
>> Peter Boosten via freebsd-questions  writes:
>>>> Op 8 sep. 2019, om 17:59 heeft Carl Johnson het volgende geschreven:
>>>>=20
>>>> I just realized that one calendar(1) entry seems to be notifying me in
>>>> the wrong week.  I have a calendar entry:=20
>>>>     September SatSecond     Shrewsbury Fair (2 days)
>>>> in my ~/calendar file to notify me on the second Saturday, but it
>>>> notified me on the first Saturday.  I get the following results:
>>>>     $ calendar -t 07-09-2019
>>>>     Sep  7* Shrewsbury Fair (2 days)
>>>>     $ calendar -t 14-09-2019
>>>>     $
>>>> September 7 is clearly the first Saturday, so why does it think that it
>>>> is the second Saturday and the 14th is not?  I also tried changing
>>>> 'SatSecond' to 'Sat+2', but that gives the same result.
>>>>=20
>>>> Am I missing something obvious, or should I file a PR on this?  Thanks
>>>> for any suggestions.
>>>
>>> It only seems to be wrong for this years September. Next year it=E2=80=
=99s
>>> okay again. Also, if you change the month to October, it works like it
>>> should.
>>
>> I did a little more checking and it also fails in September 2024.  There
>> are also similar problems in April and July of 2018.  The common factor
>> seems to be that all of those have Sunday as the first day of the month.
>> I submitted it as PR 240427 [1].
>>
>> Thanks for your reply.
>>
>> 1. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240427
>
> Are you, like me, running your login on local (UTC +nn) time?
> That might be a "factor" in the bug --- in that UTC Sunday=20
> (the 1st) would occur on your Saturday.
> Just a think.  :-)

The system clock is set to UTC but the /etc/localtime has my local time
zone, so I use Pacific time here (current PDT).  That sounds like a
possibility for how this could happen, but I'm not sure how to find
something like that.

Thanks for the suggestion.

--=20
Carl Johnson		carlj@peak.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86imq1p1sl.fsf>