Skip to content

fix(export): normalize meeting transcript timestamps for markdown exports (Fixes #1472) - #1473

Closed
stantheman0128 wants to merge 1 commit into
OpenWhispr:mainfrom
stantheman0128:fix/1472-markdown-export-timestamps
Closed

fix(export): normalize meeting transcript timestamps for markdown exports (Fixes #1472)#1473
stantheman0128 wants to merge 1 commit into
OpenWhispr:mainfrom
stantheman0128:fix/1472-markdown-export-timestamps

Conversation

@stantheman0128

Copy link
Copy Markdown
Contributor

Summary

  • Normalize epoch-millisecond meeting segment timestamps to recording-relative offsets before TXT/SRT/JSON/Markdown export.
  • Parse SQLite UTC note timestamps explicitly so export headers render in local time instead of appearing one hour behind BST.

Root cause

Diarization finalization already subtracts recording start before merge, but export-transcript read raw
ote.transcript JSON and passed epoch-ms values into ormatTimestamp(), which expects seconds from zero. That produced giant hour fields like 496069042:26:40.

Verification

\
cd openwhispr-wt/1472-markdown-export-timestamps
node --test test/helpers/transcriptFormatter.test.js

13 pass (includes epoch-ms normalization + UTC created_at parsing)

\\

AI assistance

AI-assisted (Cursor). Stan Shih reviewed the diff.

Fixes #1472

Made with Cursor

…orts

Meeting segments store epoch-millisecond timestamps, but transcript export formatters treated them as seconds-from-zero. Normalize to recording-relative offsets before TXT/SRT/JSON/Markdown export and parse SQLite UTC note timestamps explicitly so header times render in local time.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gabrielste1n

Copy link
Copy Markdown
Collaborator

Merged as #1560 — your fix, unchanged, rebased onto current main. Thank you @stantheman0128, this was a clean diagnosis of two genuinely separate bugs.

Why it moved branches rather than being rebased in place: my token can't push to a fork branch when the rebase brings .github/workflows/ changes along with it, which any rebase onto current main now does. Nothing to do with your work.

The only conflict was in test/helpers/transcriptFormatter.test.js and it was purely additive — main picked up i18n speaker-label tests from #1426 while yours added the timestamp tests. Both sets are in; nothing was dropped.

Worth recording that the blast radius was wider than the title suggests: formatTxt, formatSrt, formatJson and formatMd all share mergeSegments/formatTimestamp, and markdownMirror.js:110 writes through formatMd — so every export format and the on-disk mirror were affected, not just manual markdown export. Your fix covers all of them.

@stantheman0128

Copy link
Copy Markdown
Contributor Author

Thanks @gabrielste1n — glad the diagnosis held. Appreciate you landing it as #1560 when the fork branch was awkward to push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown export: segment timestamps use a raw seconds counter in the hours field, and header times are UTC rendered as local (v1.8.1, Windows)

2 participants