All-day events created by Dynalist do not honor Google Calendar Defaults

For every calendar in GCal, it is possible to set the default reminder behavior for timed events and all day events.
For example, notify of an event scheduled for 3pm 10 minutes before it happens (2.50p).
For all day events, notify of an event scheduled for May 14, one day before at 8pm.
(These defaults can be modified/overwritten on a per event basis on GCAL.)

Now the bug is this: all-day events created by Dynalist do not honor the defaults set in GCAL and instead set a reminder for midnight of the scheduled day.
Timed events honor the GCAL default.

I canā€™t think of anything we do that would override default notifications, all day events are set in the exact same way as regular events (just with the timestamps set to 00:00 UTC).

In a sense, you should not pass a timestamp at all? They are all-day events, not midnight events.

Can you reproduce what I describe?

I think instead of passing dateTime, you should pass a date.

end.date	date	The date, in the format "yyyy-mm-dd", if this is an all-day event.

end.dateTime	datetime	The time, as a combined date-time value (formatted according to RFC3339). A time zone offset is required unless a time zone is explicitly specified in timeZone.

https://developers.google.com/calendar/v3/reference/events/insert#javascript

Thatā€™s exactly what Iā€™m using. (Just the Java API instead of the JS API)

For reference in Java itā€™s EventDateTime.setDateTime() vs EventDateTime.setDate() which we are correctly using depending on whether the event is an all-day event or not.

So why in your previous message you said

just with timestamp 00:00 utc

I am not sure exactly how your code looks like.

Can you replicate my issue? Because if you canā€™t maybe there is something wrong on my side!

I have been reading through the google api.
I think you call

DateTime date = new DateTime("2020-01-01T00:00:00-00:00");
EventDateTime.setDate(date)

and this makes the google api confused.

Reading the docs for DateTime. I had the impression that if you want to use DateTime as a dateonly. you shold use this constructor:

public DateTime(boolean dateOnly,
                long value,
                Integer tzShift)
Instantiates DateTime, which may represent a date-only value, from the number of milliseconds since the Unix epoch, and a shift from UTC in minutes.
Parameters:
dateOnly - specifies if this should represent a date-only value
value - number of milliseconds since the Unix epoch (January 1, 1970, 00:00:00 GMT)
tzShift - time zone, represented by the number of minutes off of UTC, or null for TimeZone.getDefault().

https://googleapis.dev/java/google-http-client/latest/com/google/api/client/util/DateTime.html

For all day events, we initialize date times with new DateTime(true, ts, 0)

From experimenting a bit, it seems that for me the all-day events get the notification defaults from the timed events as if the event time was midnight.

That is, if defaults for timed events are to have notifications 10 minutes and 20 minutes before the event,
an all day event event will get notification at 11.40p and 11.50p.

Why, I donā€™t know.

Weird, so youā€™re getting the regular events setting applied to all day events?

yes, as if they were scheduled for midnight.