Format of the data&time reported by Gcal3

Hi,

I have successfully enabled sync with google calendar and everything is working according to the plugin design.

However, I am wondering if it is possible to change the date&time format of the events reported in Vera.

I am getting something like this:
“Event title” is 07:00 Sept 12

Is there any way to change the format of date&time reporting into something like below:
“Event title” is 07:00 12.09.2019

  1. Is it related to Google API spec and no changes are allowed?
  2. Could it be change in Google Calendar configuration?

Thank you for any help.

Hi - the vera UI displays string literals. I selected a format that was at least (partially) sensitive to international variations (i.e. did not assume all formats were European of American) and was reasonably compact in terms of line length.

It’s not anything related to google - just a lazy design decision I made :slight_smile:

To be honest - I had not thought about allowing the user to define the date and time layout. I’ll take a look as soon as I can (I’m very busy for the next few days) and see if it’s easy to do without having to change the code too much.

I made some changes. Try this version by downloading the zip file - decompressing it then uploading the GCal3.lua file to your vera.

After a reboot - you will see in the Advanced --> variables tab a new variable called gc_timedateformat

You can edit it and use any of the formatting symbols allowed by the lua os.date function. You can find them here:

https://www.lua.org/pil/22.1.html

The default used by GCal is %H:%M %b %d
Note when editing the variable that quotes are not needed. You can revert back to the default by entering two double quotes “”. Note that after each change to this variable - you will need to reboot the vera for the change to take effect.

Let me know how it goes.

GCal3.lua.zip (22.7 KB)