Prevent timestamp fields from being marked as changed due to timezone mismatch (#25718)

This commit is contained in:
Ahmad Khan
2025-08-21 19:29:12 +05:30
committed by GitHub
parent 2ba0ef331c
commit 443e305b1a
3 changed files with 8 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'@directus/app': patch
---
Fixed timestamp fields being incorrectly marked as changed due to timezone mismatch

View File

@@ -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;
}

View File

@@ -222,3 +222,4 @@
- 8byr0
- jekuer
- timio23
- khanahmad4527