Closed Bug 1695584 Opened 7 months ago Closed 7 months ago

TB garbles years on export-reimport, shows time with 53 min added


(Calendar :: Import and Export, defect)

Thunderbird 78


(thunderbird_esr78 wontfix)

88 Branch
Tracking Status
thunderbird_esr78 --- wontfix


(Reporter: jo.wetzig, Assigned: darktrojan)



(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15

Steps to reproduce:

Thunderbird 78.8.0 (German) on Macbook
Preparing to import a LOT of old calendars dates from csv files events were shifted from 2001 to the year 1.
Created a new calendar.
Exported a test event to csv file, reimported it.

Actual results:

Event time is shown in the overview panel off by 53 Minutes (added). When opening an edit window the time is correct. Screenshot appended.
The CSV and ICS file have the correct time.
Date is 2000 years off (missing). ICS file shows date with centuries zeroed. CSV file has date with year as two digits only (MM/DD/YY) which of course makes it quite a guess to reconstitute the century upon re-import. Manually adding the century in the CSV file resolves the problem.

Expected results:

TIME: Display should show time correctly. (Work needed)
DATE: Centuries should not get lost. (Solution: export year as four digits in the CSV file!)

Confirming. I didn't even know we did import/export with CSV, so I doubt it's had any maintenance since way back when (possibly year 1).

Ever confirmed: true
Assignee: nobody → geoff

That was easy enough to fix. There are many weird things about the CSV import/export code that should be fixed (like why does it only do the Outlook CSV format, and is that even still the same as it used to be?) but I'll just deal with the problem at hand and add the others to my ever-growing list of import/export bugs to fix.

By the way, the 53 minutes will be from before time zones were really a thing. Because the year is set to 1 the code is using the earliest time zone information it can find, which includes minutes and seconds based on the longitude of specific locations.

Pushed by
Fix conversion of two-digit years when importing events from CSV. r=mkmelin

Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.