Skip to content

[BUG] DatePicker 在有夏令时的地区无法设置其他时区对应当前时区夏令时的时刻 #2829

@shijiatongxue

Description

@shijiatongxue

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

DatePicker

Semi Version

latest

Current Behavior

具有夏令时的时区,无法选择夏令时开始的时刻,即使 DatePicker timeZone 切换到其他无夏令时时区。

以埃及-开罗(Africa/Cairo)为例。
开罗在夏令时为 GMT +3,在冬令时为 GMT +2。最近一次从冬令时调整为夏令时的时间为 2025-04-25 00:00:00,在当地的这一时刻,时钟会调整到 2025-04-25 01:00:00。

假设埃及的用户想选择 UTC 的这个时刻,也无法做到。

Expected Behavior

No response

Steps To Reproduce

计算机调整时区为开罗,使用下面代码。

ReproducibleCode

import React from 'react';
import { DatePicker } from '@douyinfe/semi-ui';

() => <DatePicker type="dateTime" timeZone={0} value={1745539200000} onChange={(date, dateString) => console.log(date)} />;

Environment

- OS:
- browser:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions