Skip to content

Open source alternative to Semrush and Ahrefs

250 B
Raw Blame
import { getDatabaseProvider } from "@/db/provider";

export function toRankTrackingTimestamp(date: Date): string {
  const iso = date.toISOString();
  return getDatabaseProvider() === "postgres"
    ? iso
    : iso.slice(0, 19).replace("T", " ");
}