| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | import React, { useState, useEffect } from "react"; |
| 2 | 2 | import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; |
| 3 | 3 | import { apiClient } from "../lib/api-client"; |
| 4 | +import { toDateValue } from "../lib/dateFormat"; | |
| 4 | 5 | import { __ } from "../lib/i18n"; |
| 5 | 6 | import { useToast } from "../components/ui/toast"; |
| 6 | 7 | import { |
| 7 | 8 | Key, |
| @@ -657,9 +658,11 @@ | ||
| 657 | 658 | </div> |
| 658 | 659 | <div className="font-medium text-gray-900 dark:text-white"> |
| 659 | 660 | {(() => { |
| 660 | 661 | try { |
| 661 | - const date = new Date( | |
| 662 | + // toDateValue: a date-only "expires" must not roll back a | |
| 663 | + // day in behind-UTC zones (datetime values pass through). | |
| 664 | + const date = toDateValue( | |
| 662 | 665 | licenseInfo.server_response.expires, |
| 663 | 666 | ); |
| 664 | 667 | return isNaN(date.getTime()) |
| 665 | 668 | ? licenseInfo.server_response.expires |