Relative Content

Tag Archive for javascriptangulartypescripticalendar

ics file start and end date correct format

in my angular app, i have an adding to calendar functionality. After the add to calendar button is clicked an .ics file is downloaded. For the calendar to understand the timezone and times, I have to convert the date format. Meaning it should be in the format of 20240326T101500Z but with timezone so that the time in calendar can convert into the device’s timezone. The code below currently returns the date in the format of;
2024-12-26T08:45:00+03:00. How can I fix this so that it’s in the correct format and the calendar converts the time to my device’s timezone