VBA-tools / VBA-UTC

UTC and ISO 8601 date conversion and parsing for VBA
MIT License
57 stars 28 forks source link

Add: Issue parsing ISO date strings with offsets #4

Closed chackl1990 closed 6 years ago

chackl1990 commented 6 years ago

Problem still seems not solved. I corrected it by using: ParseIso = ParseIso - utc_Offset instead of ParseIso = ParseIso + utc_Offset

2017-12-29T23:12:48.813+01:00 should be 2017-12-29 23:12:48 in my timezone +01:00 Vienna. The Offset is not added - it must be inverted (as i saw on wiki).

timhall commented 6 years ago

Thanks for raising this issue. Looking at the tests, it does seem to be going negative twice (-240 initially and then TZOffsetHours = Int(-OffSetMinutes / 60)). This does seem like a mistake and could be why your issue wasn't caught (and why it's backwards). I'll take a look at it.