| @@ -25,8 +25,9 @@ | ||
| 25 | 25 | BulkActionToolbar, |
| 26 | 26 | Table as SharedTable, |
| 27 | 27 | } from "../components/shared"; |
| 28 | 28 | import { __ } from "../lib/i18n"; |
| 29 | +import { toDateValue } from "../lib/dateFormat"; | |
| 29 | 30 | import { usePermissions } from "../hooks/usePermissions"; |
| 30 | 31 | import { useToast } from "../components/ui/toast"; |
| 31 | 32 | import { apiClient } from "../lib/api-client"; |
| 32 | 33 | import { getErrorContext } from "../lib/errors"; |
| @@ -285,9 +286,10 @@ | ||
| 285 | 286 | |
| 286 | 287 | const formatDate = (dateString: string) => { |
| 287 | 288 | if (!dateString) return __("N/A", "yatra"); |
| 288 | 289 | try { |
| 289 | - const date = new Date(dateString); | |
| 290 | + // toDateValue: a date-only expiry_date must not roll back a day in behind-UTC zones. | |
| 291 | + const date = toDateValue(dateString); | |
| 290 | 292 | return date.toLocaleDateString("en-US", { |
| 291 | 293 | month: "short", |
| 292 | 294 | day: "numeric", |
| 293 | 295 | year: "numeric", |