mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
### **User description** - #7864 ___ ### **PR Type** Bug fix ___ ### **Description** - Removed outdated timestamp converter function - Introduced inline microsecond timestamp parsing - Unified ISO string and Date handling - Formatted dates using timezone consistently ___ ### Diagram Walkthrough ```mermaid flowchart LR A["val (any)"] --> B{"16-digit micro?"} B -- yes --> C["timestamp = parseInt(val)/1000"] B -- no --> D{"string ISO?"} D -- yes --> E["timestamp = `${val}Z`"] D -- no --> F["timestamp = new Date(val).getTime()/1000"] C --> G["formatDate(toZonedTime(timestamp, timezone))"] E --> G F --> G ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>convertDataIntoUnitValue.ts</strong><dd><code>Remove convert16DigitTimestamp utility</code> </dd></summary> <hr> web/src/utils/dashboard/convertDataIntoUnitValue.ts <ul><li>Removed <code>convert16DigitTimestamp</code> function<br> <li> Deleted associated JSDoc comments</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7872/files#diff-14c6fe442ef231566ec411f9e0262cdd24ec912fc67b9154eec743282ab7211a">+0/-28</a> </td> </tr> <tr> <td> <details> <summary><strong>convertTableData.ts</strong><dd><code>Inline unified timestamp conversion</code> </dd></summary> <hr> web/src/utils/dashboard/convertTableData.ts <ul><li>Dropped <code>convert16DigitTimestamp</code> import<br> <li> Added inline timestamp handling in data conversion<br> <li> Branches for microseconds, ISO strings, Date objects</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7872/files#diff-a672094c46e697ee7b7a3949a901cc1f7f88ec06cddaf67370474b508d5b0960">+42/-29</a> </td> </tr> </table></td></tr></tr></tbody></table> </details> ___