vzhd1701 / evernote-backup

Backup & export all Evernote notes and notebooks
MIT License
1.01k stars 77 forks source link

[Bug]: Reminder Time Formatted Incorrectly in exported note inside a notebook #86

Open dgreen opened 7 months ago

dgreen commented 7 months ago

evernote-backup version

1.9.3

What OS are you using?

MacOS

OS Version / Linux distribution

Sonoma 14.4.1

Bug description

Yarle reports that the reminder time is in the wrong format.

evernote-backup's notebook XML of a note shows

  <reminder-time>1719842400000</reminder-time>

where an ENEX export of the same notebook shows the note's reminder as

  <reminder-time>20240701T140000Z</reminder-time>

10.84.3-mac-ddl-public (20240409145102) Editor: v177.16.3 Service: v1.100.4 © 2019 - 2024 Evernote Corporation. All rights reserved

Log excerpt

No response

dgreen commented 1 month ago

It looks like the problem is in note_formatter.py that has (starting in line 34 of the source I looked at):

        if note.attributes:
            note_skeleton["note"]["note-attributes"] = {
                "subject-date": fmt_time(note.attributes.subjectDate),
                "latitude": note.attributes.latitude,
                "longitude": note.attributes.longitude,
                "altitude": note.attributes.altitude,
                "author": note.attributes.author,
                "source": note.attributes.source,
                "source-url": note.attributes.sourceURL,
                "source-application": note.attributes.sourceApplication,
                "reminder-order": note.attributes.reminderOrder,
                "reminder-time": note.attributes.reminderTime,
                "reminder-done-time": note.attributes.reminderDoneTime,
                "place-name": note.attributes.placeName,
                "content-class": note.attributes.contentClass,
            }

I think the lines with reminder-time and reminder-done-time should have the value converted with fmt_time()

                "reminder-time": fmt_time(note.attributes.reminderTime),
                "reminder-done-time": fmt_time(note.attributes.reminderDoneTime),