mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 16:43:18 +08:00
feat: initialize netx ops tool repository
Set up netx as a standalone git-managed project with isolated Python dependencies, alarm ingestion/query APIs, oclaw bridge integration, and ops-focused UI enhancements including history and raw field access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
f49c0b5bad
56 changed files with 6974 additions and 0 deletions
12
web/src/utils/time.ts
Normal file
12
web/src/utils/time.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const systemTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
export function formatSystemTime(value: string | number | Date | null | undefined): string {
|
||||
if (value === null || value === undefined) return "";
|
||||
const d = value instanceof Date ? value : new Date(value);
|
||||
if (Number.isNaN(d.getTime())) return String(value);
|
||||
return d.toLocaleString(undefined, {
|
||||
hour12: false,
|
||||
timeZone: systemTimeZone,
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue