I am on GMT+3 and when I use @react-native-community/datetimepicker. It converts my date automatically to the GMT+0. You can check my code below.Do someone now why it is converting?Thank you!
DATE TIME PICKER
<DateTimePicker testID="dateTimePicker" value={data[name]} // value={new Date()} mode={type} // mode="time" is24Hour={true} display="spinner" onChange={handleChange} minimumDate={type === "date" ? new Date() : undefined} />
HANDLE CHANGE FUNCTION
const handleChange = (event: any, selectedDate: Date) => {setShow(false)console.log(selectedDate) // returns the selected date - 3 hoursif (selectedDate) { setDate(formatDate(selectedDate, type)) setData({ ...data, [name]: selectedDate })}
}