Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agenda seems to be confused about which events are from "today", possible timezone issue #491

Open
beardedfool opened this issue Oct 9, 2019 · 4 comments
Labels

Comments

@beardedfool
Copy link

beardedfool commented Oct 9, 2019

Sorry. I must be missing something. Trying to get today's agenda, I'm getting a missing appointment at 7am

X@X:~ $ gcalcli agenda

Mon Oct 07 Reoccuring

Wed Oct 09 birthday
7:00am Wake -# This goes missing
3:00pm testing caladd

Thu Oct 10
7:00am Wake
10:00am another normal entry # This also goes missing

pi@pi3:~ $ gcalcli agenda today tomorrow

Mon Oct 07 Reoccuring

Wed Oct 09 birthday
3:00pm testing caladd

Thu Oct 10
7:00am Wake

@jcrowgey jcrowgey added the needs-repro Reported issues which lack required details in order to reproduce label Oct 9, 2019
@jcrowgey
Copy link
Collaborator

jcrowgey commented Oct 9, 2019

Happy birthday! :)

Maybe adding --details=all would help shed some light on what is going on here. Also, can you report which version of gcalcli you're using?

@beardedfool
Copy link
Author

beardedfool commented Oct 9, 2019

Thanks Joshua, hugely appreciated. sadly not my cake day ;)
gcalcli v4.0.4

I looking at details all and realised that was an appointment from another calendar. But having made a new appointmentit still seems to happen

As I want to give you the full output, but would rather not post that here, mind if I email it to you?

Can I just check something obvious
today= midnight this morning to midnight this evening right?
tomorrow= midnight to midnight tomorrow, right?

@jcrowgey
Copy link
Collaborator

jcrowgey commented Oct 23, 2019

Ha, I wish that was more obvious than it is!

Here's a first test:

$ gcalcli agenda

No Events Found...
$ gcalcli add --when=tomorrow 
Title: test
Location: anywhere
Duration (minutes): 40
Description: a test
Enter a valid reminder or "." to end: .
0 joshua.crowgey@gmail.com
Specify calendar from above: 0
$ gcalcli agenda

Wed Oct 23  9:00am             test

So, at least in creating an event, 'tomorrow' seems to default to 9AM. Of course there's a whole bunch of variables which might be relevant: my locale (set to US/Los_Angeles), my google calendar settings.

So now to test agenda search:

$ gcalcli agenda

Wed Oct 23  9:00am             test
$ gcalcli add --when="tomorrow 12:01am"
Title: just after midnight
Location: anywhere
Duration (minutes): 10
Description: a test after midnight
Enter a valid reminder or "." to end: .
0 joshua.crowgey@gmail.com
Specify calendar from above: 0
$ gcalcli agenda today tomorrow

Wed Oct 23  12:01am            just after midnight

^^^ so that's a little surprising.

Ok, so this should be interesting:

$ for i in $(seq -w 00 23); do gcalcli add --when="tomorrow ${i}:01" --description="just after $i" --duration=10  --title="just after $i" --where="test" --noprompt"; done
$ gcalcli agenda --military

Wed Oct 23  :01            just after midnight
            :01            just after 00
            1:01           just after 01
            2:01           just after 02
            3:01           just after 03
            4:01           just after 04
            5:01           just after 05
            6:01           just after 06
            7:01           just after 07
            8:01           just after 08
            9:00           test
            9:01           just after 09
            10:01          just after 10
            11:01          just after 11
            12:01          just after 12
            13:01          just after 13
            14:01          just after 14
            15:01          just after 15
            16:01          just after 16
            17:01          just after 17
            18:01          just after 18
            19:01          just after 19
            20:01          just after 20
            21:01          just after 21
            22:01          just after 22
            23:01          just after 23
$ gcalcli agenda --military today tomorrow

Wed Oct 23  :01            just after midnight
            :01            just after 00
            1:01           just after 01
            2:01           just after 02
            3:01           just after 03
            4:01           just after 04
            5:01           just after 05
            6:01           just after 06
            7:01           just after 07
            8:01           just after 08

So that seems like a bug to me. Maybe we're dealing with UTC here (since I'm in -7 and with some sort of off by one error?). In any case, I'll open a bug for now.

@beardedfool
Copy link
Author

Just to recreate some of that in the UK - with daylight savings in effect, in case it helps

pi@pi3:~ $ gcalcli add --when="tomorrow 12:01am"
Title: just after midnight
Location: anywhere
Duration (minutes): 10
Description: a test after midnight
Enter a valid reminder or "." to end: .
pi@pi3:~ $ gcalcli agenda today tomorrow

Thu Oct 24 pay mariana £30
12:01am just after midnight
7:00am Wake
7:30am wake-ba

For the loop, was that an extra quote just after the --noprompt? I had to ctrl+c

pi@pi3:~ $ for i in $(seq -w 00 23); do gcalcli add --when="tomorrow ${i}:01" --description="just after $i" --duration=10 --title="just after $i" --where="test" --noprompt"; done

^C

Assuming I found the right one

pi@pi3:~ $ for i in $(seq -w 00 23); do gcalcli add --when="tomorrow ${i}:01" --description="just after $i" --duration=10 --title="just after $i" --where="test" --noprompt; done

Thu Oct 24 pay mariana £30
00:01 just after midnight
00:01 just after 00
01:01 just after 01
02:01 just after 02
03:01 just after 03
04:01 just after 04
05:01 just after 05
06:01 just after 06
07:00 Wake
07:01 just after 07
07:30 wake-ba
08:01 just after 08

image

@jcrowgey jcrowgey added bug and removed needs-repro Reported issues which lack required details in order to reproduce labels Nov 17, 2019
@dbarnett dbarnett changed the title Today's agenda Agenda seems to be confused about which events are from "today", possible timezone issue Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants