Closed Bug 1726077 Opened 3 years ago Closed 3 years ago

vCard dates incorrectly translated from UTC to local time

Categories

(MailNews Core :: Address Book, defect, P1)

Tracking

(thunderbird_esr78 wontfix, thunderbird_esr9193+ fixed, thunderbird92 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird_esr91 93+ fixed
thunderbird92 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

When a date in a vCard (e.g. 2021-08-17) is parsed, it is correctly assumed to be in UTC (17 Aug 2021 00:00), but then local date values are read from it. That's not a problem if the local date matches the UTC date (17 Aug 2021 12:00 Pacific/Auckland, so still the 17th) but where it doesn't (16 Aug 2021 19:00 America/Chicago, not the 17th) we've got a problem.

We store date values as address book card properties, so even if we fix this and even though we have the correct vCard stored, the user will still be displayed the wrong date and if they save the card the wrong date will be propagated.

Fixing the problem itself is easy. I'm wondering if I can and/or should trigger a reparsing of all cards for which vCard data is stored. Leaning towards "no".

The other problem I have thought of is, AFAIK, this is impossible to have an automated test for. I can test it manually by setting environment variables, but I don't think I can do that on the CI.

Target Milestone: --- → 93 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1764da179451
Correctly parse vCard date values in all time zones. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9236562 [details]
Bug 1726077 - Correctly parse vCard date values in all time zones. r=mkmelin!

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Thunderbird changes the value of birthdays and anniversaries every time a contact is edited
Testing completed (on c-c, etc.): on c-c since last week, although there's been no Linux/Windows nightlies since then
Risk to taking this patch (and alternatives if risky): low

Attachment #9236562 - Flags: approval-comm-beta?

Comment on attachment 9236562 [details]
Bug 1726077 - Correctly parse vCard date values in all time zones. r=mkmelin!

[Triage Comment]
Approved for beta

Attachment #9236562 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9236562 [details]
Bug 1726077 - Correctly parse vCard date values in all time zones. r=mkmelin!

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Thunderbird changes the value of birthdays and anniversaries every time a contact is edited
Testing completed (on c-c, etc.): in 92.0b3
Risk to taking this patch (and alternatives if risky): low

Attachment #9236562 - Flags: approval-comm-esr91?

Comment on attachment 9236562 [details]
Bug 1726077 - Correctly parse vCard date values in all time zones. r=mkmelin!

[Triage Comment]
Approved for esr91

Attachment #9236562 - Flags: approval-comm-esr91? → approval-comm-esr91+
Blocks: tb91found
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: