mirror of
https://github.com/directus/directus.git
synced 2026-01-11 01:08:08 -05:00
Prevent timestamp fields from being marked as changed due to timezone mismatch (#25718)
This commit is contained in:
5
.changeset/kind-ducks-pay.md
Normal file
5
.changeset/kind-ducks-pay.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@directus/app': patch
|
||||
---
|
||||
|
||||
Fixed timestamp fields being incorrectly marked as changed due to timezone mismatch
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { getFlatpickrLocale } from '@/utils/get-flatpickr-locale';
|
||||
import { format, formatISO } from 'date-fns';
|
||||
import { format } from 'date-fns';
|
||||
import Flatpickr from 'flatpickr';
|
||||
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -111,7 +111,7 @@ function emitValue(value: Date | null) {
|
||||
emit('update:modelValue', format(value, 'HH:mm:ss'));
|
||||
break;
|
||||
case 'timestamp':
|
||||
emit('update:modelValue', formatISO(value));
|
||||
emit('update:modelValue', value.toISOString());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -222,3 +222,4 @@
|
||||
- 8byr0
|
||||
- jekuer
|
||||
- timio23
|
||||
- khanahmad4527
|
||||
|
||||
Reference in New Issue
Block a user