feat(timezone): implement Tehran timezone handling across the application
This commit is contained in:
@@ -20,7 +20,7 @@ import { useNavigate } from "react-router-dom";
|
||||
import { toast } from "sonner";
|
||||
import type { ApiResponse } from "../lib/api";
|
||||
import { api } from "../lib/api";
|
||||
import { formatRial } from "../lib/utils";
|
||||
import { formatRial, tehranWallClockToUnix } from "../lib/utils";
|
||||
import type { Appointment } from "../types";
|
||||
import AppointmentStatusDropdown from "./ui/AppointmentStatusDropdown";
|
||||
import Modal from "./ui/Modal";
|
||||
@@ -30,8 +30,7 @@ import PriceInput from "./ui/PriceInput";
|
||||
/** Row actions for the appointments table (Figma عملیات menu). */
|
||||
type ModalKind = null | "info" | "move" | "transfer" | "replace";
|
||||
|
||||
const toEpoch = (isoDate: string, time: string) =>
|
||||
Math.floor(new Date(`${isoDate}T${time || "00:00"}`).getTime() / 1000);
|
||||
const toEpoch = (isoDate: string, time: string) => tehranWallClockToUnix(isoDate, time);
|
||||
|
||||
/**
|
||||
* Resolve the patient-record uuid behind an appointment via the patient list
|
||||
|
||||
Reference in New Issue
Block a user