Skip to content

Commit 89da0f1

Browse files
committed
fix: timestamp
1 parent 31f0e08 commit 89da0f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/uptime/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { clickHouse } from "@databuddy/db";
1+
import { clickHouse, formatClickhouseDate } from "@databuddy/db";
22
import Elysia from "elysia";
33
import { checkUptime, lookupWebsite } from "./actions";
44

@@ -58,7 +58,7 @@ const app = new Elysia().post("/", async ({ headers }) => {
5858
{
5959
site_id: data.site_id,
6060
url: data.url,
61-
timestamp: new Date(data.timestamp).toISOString(),
61+
timestamp: formatClickhouseDate(new Date(data.timestamp)),
6262
status: data.status,
6363
http_code: data.http_code,
6464
ttfb_ms: data.ttfb_ms,
@@ -72,7 +72,7 @@ const app = new Elysia().post("/", async ({ headers }) => {
7272
probe_region: data.probe_region,
7373
probe_ip: data.probe_ip,
7474
ssl_expiry: data.ssl_expiry
75-
? new Date(data.ssl_expiry).toISOString()
75+
? formatClickhouseDate(new Date(data.ssl_expiry))
7676
: null,
7777
ssl_valid: data.ssl_valid,
7878
env: data.env,

0 commit comments

Comments
 (0)