const BEIJING_TIME_ZONE = "Asia/Shanghai";

export function formatDateTime(value: string | Date | null | undefined): string {
  if (!value) return "";
  return new Date(value).toLocaleString("zh-CN", { timeZone: BEIJING_TIME_ZONE, hour12: false });
}

export function formatDate(value: string | Date | null | undefined): string {
  if (!value) return "";
  return new Date(value).toLocaleDateString("zh-CN", { timeZone: BEIJING_TIME_ZONE });
}
