diff --git a/src/generate/luxon.ts b/src/generate/luxon.ts index dffa4acf3..6e9832242 100644 --- a/src/generate/luxon.ts +++ b/src/generate/luxon.ts @@ -57,7 +57,14 @@ const normalizeLocale = (locale: string): string => locale.replace(/_/g, '-'); const generateConfig: GenerateConfig = { // get - getNow: () => DateTime.local(), + getNow: () => { + /** + * The current time that can respond to tz settings is required. like `dayjs().tz()`. + * @see: https://github.com/ant-design/ant-design/issues/51282 + * https://github.com/react-component/picker/pull/878 + */ + return DateTime.now(); + }, getFixedDate: (string) => DateTime.fromFormat(string, 'yyyy-MM-dd'), getEndDate: (date) => date.endOf('month'), getWeekDay: (date) => date.weekday,