Zren / plasma-applets

This monolithic repo has been broken up into individual repos for each widget.
84 stars 23 forks source link

[EventCalendar] Quick Add places events on current date instead of target date (when gcal language is "ru"/Русский) #76

Open Zren opened 7 years ago

Zren commented 7 years ago

Placing an event on Apr 25 with the text "Test" has an event created on Apr 20 (today) instead.

Our code is:

            var dateString = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate()
            var eventText = dateString + ' ' + text
            Shared.createGCalEvent({
                access_token: accessToken,
                calendarId: calendarId,
                text: eventText,
            }, function(err, data) {

Which places "2017-4-20 " (for the target date of April 20th) in front of the user entered text.

Changing my calendar to "sr" had no effect. I thought it meant cyrillic, but sr is Serbian not russian.

Changing it to "ru" Русский, it reproduces the bug.

Zren commented 7 years ago

Creating an event with "ru" using "test6" creates an event today, starting at 6:05 PM for 1 hour till 7:05 (that's probably when I made the event). Interesting that it doesn't make an all day event.

shvchk commented 7 years ago

Yeah, it seems Google just doesn't recognize dates on quick add when language is set to Russian (more languages are probably affected). I've tested lots of different types of dates adding events with Calendar Chrome extension from Google, nothing worked, so for now I just changed language to English in Google Calendar settings.