Comments (5)
On further inspection, i think i found the issue.
The timezone in the ics is "W. Europe Standard Time", which is parsed by biweekly to a timezone with the id "W. Europe Standard Time" and the displayname "GMT+01:00", which is not the same as the Microsoft timezone with the id "W. Europe Standard Time" which would be the olson id "Europe/Amsterdam".
The parsed timezone "GMT+01:00" has an offset of 7200000 (2h) while the "Europe/Amsterdam" timezone has an offset of 3600000 (1h) for the timestamp in question (start of the ics on November 23, 1669190400000 )
The source of the mapping i use is https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml
with code similar to this old snippet https://gist.github.com/scottmac/655675e9b4d4913c539c
or this code https://github.com/LinkedInAttic/RookBoom/blob/master/ews/src/main/java/com/microsoft/exchange/utils/WindowsZonesMapping.java
I built a workaround by using the id of the biweekly timezone as an Exchange identifier and look up the matching olson timezone.
from biweekly.
Looks like it was my mistake, i assumed that vEvent.getDateEnd().getValue() returned a Date with an UTC timestamp, but on further inspection i saw that there are other components in the extended class ICalDate.
Using vEvent.getDateStart().getValue().getRawComponents().toDate(TimeZone.getDefault()) i can get the timestamp
from biweekly.
Not sure if this helps, but:
In order to parse the "W. Europe Standard Time" timestamps in your examples, biweekly uses the timezone definition data located between the BEGIN:VTIMEZONE
and END:VTIMEZONE
lines.
If the "TZID" parameter value begins with a /
, then biweekly will treat the timezone as an Olsen ID and will use Java's embedded timezone definition to parse the timestamp. For example: DTSTART;TZID="/Europe/Amsterdam":20221029T080000
from biweekly.
The timezone in the ics switches from +0200 to +0100 at the last sunday of october (BYDAY=-1SU;BYMONTH=10), but the parsed timezone does not.
Microsoft does not use Olson ids, which should not matter if biweekly parses the timezone information.
from biweekly.
Could you write a unit test that demonstrates this?
from biweekly.
Related Issues (20)
- Compile error from adding biweekly to Android app HOT 2
- Unable to get the revert mail on accepting event in gmail HOT 4
- query events HOT 3
- How to set up VEvent according to user choice HOT 2
- Organizer's email not recognized in Apple ICS HOT 2
- Could not download TZ info HOT 8
- Vulnerabilities from dependencies: CVE-2020-36518 HOT 1
- Order of RRULE components produces different results HOT 4
- Γ₯Àâ become ??? HOT 2
- Evaluate if `event` is currently in progress
- END:VCALENDAR tag truncated in output of go() HOT 2
- AssertionError: 96 in TimeUtils.monthLength HOT 2
- BYSETPOS skips first occurrence HOT 3
- Feature Request: Option for strict parsing HOT 1
- Validating RRULE strings HOT 1
- EXDATE is parsed as a DATE-TIME while it is a DATE HOT 2
- Timezone not working if date is in the future and after a daylight saving switch HOT 9
- Index out of bounds for specific durations HOT 5
- updating to 0.6.8 from 0.6.7 causes build to fail ("Failed to transform jackson-core-2.16.1.jar") HOT 1
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 biweekly.