Notion Import date errors

Great News! I think i figure it out but need someone to fix this real quick!

I encountered a consistent issue where dates imported from Notion to Anytype are one day behind. After testing, I found the root cause: Notion exports date-only fields (e.g., “2025-08-09”) without time, which Anytype parses as 00:00 UTC. In my EDT (GMT-4:00) timezone, this shifts the date back by one day due to the negative offset.

Steps I Took:

  1. Confirmed the issue with the latest Anytype version, importing a Notion database with set dates.
  2. Noticed dates like “August 9, 2025” in Notion appeared as “August 8, 2025” in Anytype.
  3. Switched my Mac’s timezone to UTC and re-imported; dates aligned correctly.
  4. Reverted to EDT; the offset returned.
  5. Added 12:00 p.m. to Notion dates manually and re-imported without changing timezone; dates imported correctly.

Problem:

The offset occurs because Anytype interprets Notion’s naive date strings as UTC midnight, then adjusts to the local timezone (EDT), causing a one-day lag. This doesn’t happen in UTC or with a time set.

Suggested Fix:

  • Modify the Notion importer in anyproto/anytype-heart (e.g., pkg/import/notion/property.go) to parse date-only strings as local 00:00 instead of UTC, using time.ParseInLocation(layout, str, time.Local) in Go.
  • Alternatively, add an option during import to specify a default time (e.g., 12:00 p.m.) for date-only fields to avoid the shift.