upd: make schedule time work cross timezones
This commit is contained in:
parent
e2352839e4
commit
e50ff9db6a
5 changed files with 28 additions and 42 deletions
|
|
@ -18,6 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import moment from 'moment';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import { formatDateTimeString } from '@/scripts/format-time-string.js';
|
||||
import { addTime } from '@/scripts/time.js';
|
||||
|
|
@ -46,7 +47,7 @@ if (props.modelValue.scheduledAt) {
|
|||
|
||||
function get() {
|
||||
const calcAt = () => {
|
||||
return new Date(`${ atDate.value } ${ atTime.value }`).getTime();
|
||||
return moment(`${ atDate.value } ${ atTime.value }`).utc().valueOf();
|
||||
};
|
||||
|
||||
return { scheduledAt: calcAt() };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue