79188604

Date: 2024-11-14 11:51:17
Score: 4.5
Natty:
Report link

Resolved in a strange way. I've been experimenting a bit and when I changed the statement

var obj = {TYPE: item.getTitle(), DATE: item.getAllDayStartDate()}

to this:

var obj = {TYPE: item.getTitle(), DATE: (item.getStartTime() + (3 * HOUR))}

I didn't get the (wrong) start time + 3 hours, which would put the event at the correct date. Instead I now get the correct date and time, including the deviation from UTC time as 'GMT+0100'. This is what I originally wanted. Maybe adding an amount of time to the result of item.getStartTime() implicitly converts the result to local time???

Reasons:
  • Blacklisted phrase (1): ???
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Gilbert