Skip to content

notion: a comment's created_time and last_edited_time keep their seconds and have no milliseconds, where real gives the minute #1110

Closed

Description

@nuriyoo

Found while reviewing #1098.

Source and commit — notion (GET /v1/comments), main at 426d4b08. list_comments in backlot/routers/notion.py writes a comment's created_time and last_edited_time with synth.rfc3339: to the second, with no milliseconds.

How you know — measured against api.notion.com on 2026-10-27 with an internal integration's token under Notion-Version: 2025-09-03, on a page of our own workspace: the first three comments GET /v1/comments?block_id= listed each answered created_time and last_edited_time 2026-10-20T16:50:00.000Z, zero seconds and milliseconds. That is the form real gives a page's, a block's and a data source's timestamps, which is #882.

Reproduction — one record, over backlot.serve():

import json
import urllib.request

import backlot

records = [
    {"source_type": "notion", "doc_id": "page", "teamspace": "eng", "title": "Page", "content": "Body.",
     "author_email": "ava@acme.com", "visibility": "public",
     "created": "2026-03-01T08:15:42Z", "updated": "2026-03-02T09:30:17Z",
     "comments": [{"author_email": "ava@acme.com", "body": "Looks good.",
                   "created_ts": "2026-03-02T10:20:33Z"}]},
]

with backlot.serve(records) as s:
    h = {"Authorization": f"Bearer {s.token}", "Notion-Version": "2025-09-03",
         "Content-Type": "application/json"}

    def call(method, path, body=None):
        data = None if body is None else json.dumps(body).encode()
        req = urllib.request.Request(f"{s.base_url}/notion/v1/{path}", data=data, method=method, headers=h)
        with urllib.request.urlopen(req) as r:
            return json.load(r)

    (page,) = call("POST", "search", {})["results"]
    (comment,) = call("GET", f"comments?block_id={page['id']}")["results"]
    print(comment["created_time"], comment["last_edited_time"])

prints 2026-03-02T10:20:33Z 2026-03-02T10:20:33Z on 426d4b08, where real's form for that minute is 2026-03-02T10:20:00.000Z.

1. A comment's timestamps keep their seconds and have no milliseconds

Request — GET /v1/comments?block_id={page_id}.

Backlot serves — "created_time":"2026-03-02T10:20:33Z" and the same last_edited_time for a comment the corpus dates 10:20:33.

The real API serves — the minute with zero seconds and milliseconds: "2026-10-20T16:50:00.000Z" for each comment measured, in both fields.

Can a client tell? Not from the status. The strings differ on the wire: in the milliseconds always, and in the seconds wherever the corpus dates a comment past the minute's start.

Activity

  1. added
    fidelityThe vendor API defines the right answer; closing this needs a measurement against it
    on Oct 27, 2026
  2. nuriyoo commented on Oct 27, 2026

    @nuriyoo
    ContributorAuthor

    Measured again on 2026-10-27 (UTC) with a comment written for the purpose on the same page: POST /v1/comments, sent at 16:29:45.066 and answered by 16:29:45.567, gave created_time and last_edited_time 2026-10-27T16:29:00.000Z, and GET /v1/comments?block_id= listed it with those two values under 2022-06-28, 2025-09-03 and 2026-03-11. So real cuts a comment's time to the minute it falls in (the 45 seconds went), under each of those versions. Backlot serves no POST /v1/comments, so the listing is where this shows.

  3. saisarans2007 commented on Oct 28, 2026

    @saisarans2007
    Contributor

    I'd like to take this one.

  4. added a commit that references this issue on Oct 30, 2026
    08f22dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fidelityThe vendor API defines the right answer; closing this needs a measurement against it

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions