merge: Make schedule time work cross timezones (!819)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/819 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Charlotte <timo.herngreen@gmail.com>
This commit is contained in:
commit
3b5e3fd460
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