-
Notifications
You must be signed in to change notification settings - Fork 15.4k
fix(opencode): log timestamps use local datetime instead of UTC ISO string #21330
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Description
Two places in packages/opencode/src/util/log.ts use toISOString() which outputs UTC time, not local time:
- Log filename (line 66): new Date().toISOString() — filename like 2026-04-07T02:30:00.log reflects UTC, not where the user is
- Log entry timestamp (line 127): next.toISOString() — every log line shows UTC time, making it hard to correlate with local events
For users not in UTC, both are confusing. The fix is to format using local time methods instead.
Plugins
No response
OpenCode version
1.3.17
Steps to reproduce
- cd ~/.local/share/opencode/log
- cat any log file
Screenshot and/or share link
No response
Operating System
macOS 26.4
Terminal
ghostty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Type
Fields
Give feedbackNo fields configured for issues without a type.