Zen: Workspace - Missing 31 Jan data, incorrect label in Asia/Singapore timezone in "Usage costs broken down by model" #8216

Open
opened 2026-02-16 18:09:26 -05:00 by yindo · 0 comments
Owner

Originally created by @amoshydra on GitHub (Feb 1, 2026).

Originally assigned to: @fwang on GitHub.

Description

Not related to Opencode CLI
Related to Zen instead - not sure where to report this. Feel free to remove / close if this ticket is irrelevant

This issue contains 2 bugs in the UI:

Bug 1:

Chart renders incorrect label Feb 31 in Asia/Singapore timezone when receives data for Feb 01

Labeling is correct when Timezone is set to America/New_York in Chrome Devtool

Time tested 2026-02-01T19:33+08:00 - 2026-02-01T20:16+08:00

Bug 2:

The Zen workspace "Usage costs broken down by model." doesn't contain data for 31 January.
Looks like /_server does not return data for 31 January (regardless of Timezone).

Motivation

Was trying to figure out why my credit run out.
Trying to sum the usage via usage chart, but the value does not tally.

Realized missing data in 31 Jan and found incorrect label for Feb 01 (Feb 31)

API response for "Usage History" contains data for 31 January, so I was able to manually sum and verify from that.

Plugins

N/A

OpenCode version

N/A

Steps to reproduce

In Chrome Devtool overrides timezone to Asia/Singapore

Chrome Devtool -> Sensors -> Location -> Timezone ID = "Asia/Singapore"

Then refresh the page. Observe incorrect label 31 Feb in the chart is assigned for the data point for 01 Feb

Screenshot and/or share link

Issue 1

Debugger snapshot for formatDateLabel:

dataStr: "2026-02-01"
return: "Feb 31"
  month = "Feb"
  day = "31"

Debugger result

Observed label in chart

Incorrect labeling of Feb 01 as 31 in Asia Singapore timezone

Perhaps this might resolve the issue

-  const day = date.getUTCDate().toString().padStart(2, "0"); // '31'
+  const day = date.getDate().toString().padStart(2, "0"); // '01'

Issue 2

Missing Jan 31 data from API response and in Chart. Overriding timezone from client side doesn't help.

Missing Jan 31

Operating System

N/A

Terminal

N/A

Originally created by @amoshydra on GitHub (Feb 1, 2026). Originally assigned to: @fwang on GitHub. ### Description Not related to Opencode CLI Related to Zen instead - not sure where to report this. Feel free to remove / close if this ticket is irrelevant This issue contains 2 bugs in the UI: #### Bug 1: Chart renders incorrect label `Feb 31` in `Asia/Singapore` timezone when receives data for `Feb 01` Labeling is correct when Timezone is set to `America/New_York` in Chrome Devtool Time tested `2026-02-01T19:33+08:00` - `2026-02-01T20:16+08:00` #### Bug 2: The Zen workspace "Usage costs broken down by model." doesn't contain data for 31 January. Looks like `/_server` does not return data for 31 January (regardless of Timezone). #### Motivation Was trying to figure out why my credit run out. Trying to sum the usage via usage chart, but the value does not tally. Realized missing data in 31 Jan and found incorrect label for Feb 01 (Feb 31) API response for "Usage History" contains data for 31 January, so I was able to manually sum and verify from that. ### Plugins N/A ### OpenCode version N/A ### Steps to reproduce In Chrome Devtool overrides timezone to Asia/Singapore Chrome Devtool -> Sensors -> Location -> Timezone ID = "Asia/Singapore" Then refresh the page. Observe incorrect label 31 Feb in the chart is assigned for the data point for 01 Feb ### Screenshot and/or share link #### Issue 1 Debugger snapshot for `formatDateLabel`: ```js dataStr: "2026-02-01" return: "Feb 31" month = "Feb" day = "31" ``` ![Debugger result](https://github.com/user-attachments/assets/03d20465-6282-4a8f-8b88-3274385756e1) Observed label in chart ![Incorrect labeling of Feb 01 as 31 in Asia Singapore timezone](https://github.com/user-attachments/assets/ae0f67a0-6e64-48f8-a64e-5a2a300728d5) Perhaps this might resolve the issue ```diff - const day = date.getUTCDate().toString().padStart(2, "0"); // '31' + const day = date.getDate().toString().padStart(2, "0"); // '01' ``` #### Issue 2 Missing Jan 31 data from API response and in Chart. Overriding timezone from client side doesn't help. ![Missing Jan 31](https://github.com/user-attachments/assets/8515be20-d7e6-4c6a-b71e-9e5c22acc556) ### Operating System N/A ### Terminal N/A
yindo added the bugzen labels 2026-02-16 18:09:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8216