mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Calendar): fix timezone (#4742)
* fix(Calendar): fix timezone * test(Calendar): update demo snap
This commit is contained in:
parent
83c90c4624
commit
9919e8b2cf
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@ -20,6 +20,11 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: szenius/set-timezone@v1.0
|
||||||
|
with:
|
||||||
|
timezoneLinux: "Asia/Shanghai"
|
||||||
|
timezoneMacos: "Asia/Shanghai"
|
||||||
|
timezoneWindows: "China Standard Time"
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
|
@ -6,7 +6,6 @@ function getMonths(minDate, maxDate) {
|
|||||||
var cursor = getDate(minDate);
|
var cursor = getDate(minDate);
|
||||||
|
|
||||||
cursor.setDate(1);
|
cursor.setDate(1);
|
||||||
cursor.setMinutes(cursor.getMinutes() - cursor.getTimezoneOffset());
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
months.push(cursor.getTime());
|
months.push(cursor.getTime());
|
||||||
|
@ -497,7 +497,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
>
|
>
|
||||||
<month
|
<month
|
||||||
class="month"
|
class="month"
|
||||||
data-date="{{1325376000000}}"
|
data-date="{{1325347200000}}"
|
||||||
id="month0"
|
id="month0"
|
||||||
bind:click="onClickDay"
|
bind:click="onClickDay"
|
||||||
>
|
>
|
||||||
@ -892,7 +892,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
</month>
|
</month>
|
||||||
<month
|
<month
|
||||||
class="month"
|
class="month"
|
||||||
data-date="{{1328054400000}}"
|
data-date="{{1328025600000}}"
|
||||||
id="month1"
|
id="month1"
|
||||||
bind:click="onClickDay"
|
bind:click="onClickDay"
|
||||||
>
|
>
|
||||||
@ -1270,7 +1270,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
</month>
|
</month>
|
||||||
<month
|
<month
|
||||||
class="month"
|
class="month"
|
||||||
data-date="{{1330560000000}}"
|
data-date="{{1330531200000}}"
|
||||||
id="month2"
|
id="month2"
|
||||||
bind:click="onClickDay"
|
bind:click="onClickDay"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user