Comments (4)
As long as using UTC datetimes works in nearly every client I would stick to this solution, because it's not possible to detect the end users location and timezone right now.
Did you have any issues with UTC dates?
from ical-generator.
Yeah, at the moment timezone support is fudged a bit (I wrote this bit). Using UTC is obviously not correct, but neither is using the local time set on the Date object, because the timezone being output in the ical file will not necessarily be the machine's local date, and JS Date objects can only be either UTC or local time. It seemed to be more straightforward and predictable to use UTC dates in this case.
I think the solution would be to pull in moment-timezone as a dependency for proper timezone handling. I started sketching this out at on #38 but maybe I should finish it off.
from ical-generator.
+1 to using moment-timezone
. It's what I'm using in srct/schedules and it's a bit hard to follow what happens to the timezones and the times themselves between going into and out ical-generator
.
from ical-generator.
ical-generator 3.0 now uses moment-timezone, so this issue should be fixed. You can test the current develop with npm i ical-generator@next
.
from ical-generator.
Related Issues (20)
- Can't set `PRODID` freely HOT 2
- According to RFC 5545 3.1. Content Lines, generated lines should not go beyond 75 characters HOT 1
- Thank you! HOT 1
- Versioning is confusing and not user-friendly HOT 7
- Add DURATION property within the iCalEvent HOT 2
- Edge case where GEO is defined but not added due to LOCATION title not present HOT 13
- ORGANIZER output in `toString()` could be improved HOT 3
- Attendee missing from ICalAlarmData HOT 3
- ICalAlarmType missing `email` type HOT 2
- Summary missing from ICalAlarmData HOT 1
- Add Email Support in `ICalAlarm` HOT 5
- Attachments missing properties and `x` as well HOT 2
- Allow setting `GEO` by making `ICalLocation.title` optional HOT 2
- Allday timezone issue HOT 3
- Updating the start and end time of an event sets the values wrongly depending on the order the operations are done. HOT 10
- Consider supporting/migrating to new temporal API HOT 3
- DTSTAMP should check the floating property HOT 2
- Respect timezone of Luxon DateTime instance when rendering an allday event HOT 3
- Ability to parse existing *.ics file into an ICalCalendar class HOT 4
- Support for repeating events byDay with "1WE" and similar HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ical-generator.