I believe d.toDateString() will output the format you're looking for.

var d = new Date();
d.setTime(1432851021000);
d.toDateString(); // outputs to "Thu May 28 2015"
d.toGMTString(); //outputs to "Thu, 28 May 2015 22:10:21 GMT"

Or even d.toLocaleString() "5/28/2015, 6:10:21 PM"

There are lots of methods available to Date()

Answer from gautsch on Stack Overflow
🌐
DEV Community
dev.to › shubhampatilsd › removing-timezones-from-dates-in-javascript-46ah
Removing Timezones from Dates in Javascript - DEV Community
April 23, 2023 - I finally thought that this would be a great solution: store the output of .toLocaleString() and convert it to a Date again on the client, all without the timezone. However, when I implemented the solution in my React Native app, it didn't work. It kept telling me that I had passed an invalid date into the Date constructor. I searched on the internet. Then, I found this on the MDN Web Docs: This gave me a hint as to why the code worked in my browser but not my React Native app. The JS in Firefox was running on a different runtime than React Native. Since JavaScript is so uncoordinated, JS code typically runs in a specific environment called an engine.
Discussions

Remove timezone from a moment.js object
I'm using datetimepicker.js and its date function returns a moment.js object. It does so with the local UTC offset in it and my original date has a different offset. My original date: 2015-10-0... More on github.com
🌐 github.com
4
December 4, 2015
Question: Is there any way to prevent `dayjs` from converting my date into local timezone before formatting?
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API - iamkun/dayjs More on github.com
🌐 github.com
4
June 4, 2024
How to remove timezone from the date/time field in Change ...
Loading · ×Sorry to interrupt · Refresh More on forums.ivanti.com
🌐 forums.ivanti.com
April 5, 2024
Date formatting JSON (remove timezone) — DataTables forums
Hello, I am coming to you because I have a problem when importing my data into my table. Indeed, I receive a date in JSON but it is in this format: More on datatables.net
🌐 datatables.net
May 27, 2021
🌐
Reddit
reddit.com › r/learnjavascript › how to remove timezone ?
r/learnjavascript on Reddit: How to remove timezone ?
May 7, 2025 -

Hello,

I have a datepicker and it shows me example this:

Sun May 04 2025 15:30:00 GMT+0200 (Mitteleuropäische Sommerzeit)

if I send it to my backend with fetch in the network list it shows this:

2025-05-04T13:30:00

two hours different but I want to remove the timezone how I do it ?

let startTime = picker.value();

const send = async () => { 
  const res = await fetch('https://backend...', {
     method: 'POST',
  headers: {
    'Content-type': 'application/json; charset=UTF-8',
  },
  body: JSON.stringify({
    startTime
  }),
})
.....
},

I tried this

startTime.toISOString().slice(0, 19)

but not works it shows correctly in console.log but after send to my backend in the network tab in chrome it shows this:

2025-05-04T13:30:00

but it should be 15:30

🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › getTimezoneOffset
Date.prototype.getTimezoneOffset() - JavaScript | MDN
const date1 = new Date("August 19, 1975 23:15:30 GMT+07:00"); const date2 = new Date("August 19, 1975 23:15:30 GMT-02:00"); console.log(date1.getTimezoneOffset()); // Expected output: your local timezone offset in minutes // (e.g., -120). NOT the timezone offset of the date object.
🌐
GitHub
github.com › moment › moment › issues › 2788
Remove timezone from a moment.js object · Issue #2788 · moment/moment
December 4, 2015 - I'm using datetimepicker.js and its date function returns a moment.js object. It does so with the local UTC offset in it and my original date has a different offset. ... Note how I removed the +01 offset at the end.
Author   alvarotrigo
🌐
Ursahealth
ursahealth.com › new-insights › dates-and-timezones-in-javascript
Working with dates and timezones in JavaScript: a survival guide
May 4, 2021 - To render this date with confidence we have to actually change the universal time that the JavaScript object is trying to represent. Remember that getTime() converts the date to an integer representing milliseconds. If we back out the server timezone offset, and apply the local timezone offset, we will have shifted the universal time from the server’s midnight to the user’s local midnight.
🌐
Medium
toastui.medium.com › handling-time-zone-in-javascript-547e67aa842d
Handling Time Zone in JavaScript. Recently, I worked on a task of adding… | by TOAST UI | Medium
August 30, 2019 - Or what if you need to display a variety of time zones at the same time in a single application? Like I said several times, JavaScript does not allow manual change of local time zone. The only solution to this is adding or removing the value of the offset from the date provided that you already know the value of the time zone’s offset.
Find elsewhere
🌐
GitHub
github.com › iamkun › dayjs › issues › 2669
Is there any way to prevent `dayjs` from converting my date ...
June 4, 2024 - ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API - iamkun/dayjs
Author   aayushchugh
🌐
date-fns
date-fns.org
date-fns - modern JavaScript date utility library
date-fns provides the most comprehensive yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
🌐
Telerik
telerik.com › javascript › timezone › remove
remove - API Reference - Kendo UI timezone - Kendo UI for jQuery
<script> var version = kendo.version; $.getScript( "https://kendo.cdn.telerik.com/" + version + "/js/kendo.timezones.min.js", loadExample, ); function loadExample() { var targetDate = new Date(2016, 10, 5, 15, 25, 11); var convertedDate1 = kendo.timezone.remove(targetDate, "Etc/GMT-6"); var convertedDate2 = kendo.timezone.remove(targetDate, -360); /* The result can be observed in the DevTools(F12) console of the browser.
🌐
W3Schools
w3schools.com › Jsref › jsref_gettimezoneoffset.asp
JavaScript Date getTimezoneOffset() Method
cssText getPropertyPriority() getPropertyValue() item() length parentRule removeProperty() setProperty() JS Conversion · ❮ Previous JavaScript Date Reference Next ❯ · Get the difference between UTC time and local time: const d = new Date(); let diff = d.getTimezoneOffset(); Try it Yourself » ·
🌐
YouTube
youtube.com › watch
JavaScript Date Object and Time Zones | Fixing an "off by 1 day" bug - YouTube
How to handle UTC and local time zone when turning a date string into a JavaScript Date object. And fixing a bug where date is off by one day.Reference Links...
Published   February 11, 2019
🌐
Netlify
netlify.com › blog › how-to-get-timezone-in-javascript-with-edge-functions
How to get the user‘s timezone in JavaScript with Edge Functions
The traditional solution to this problem would be to perform any conditional logic on a server and deliver an adjusted and formatted date and time to the client at request-time. However, if you’re building a mainly static site, you probably don’t want to introduce a server just for the purposes of avoiding potential client-side drawbacks. But I have some great news for you! Timezone data is now available in Netlify Edge Functions, removing the need to use any client-side JavaScript to successfully localize dates and times or introduce a fully-fledged server.
🌐
YouTube
youtube.com › watch
How to Remove the Timezone Part from a JavaScript Date String
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🌐
Google Groups
groups.google.com › g › google-apps-script-community › c › TOpA_eTrPdo
How to remove timezone from this date and time:
const hyperlinkUrl = sheet.getRange(editedRow, 7).getFormula().match(/"(.*?)"/)[1]; // Extract the URL from the formula ... const receivedDate = new Date(); // Replace this with the actual receivedDate variable from your existing code
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-set-timezone-offset-using-javascript
How to set timezone offset using JavaScript ? | GeeksforGeeks
December 6, 2024 - The Intl.DateTimeFormat with the timeZone option allows formatting dates according to a specific timezone for display purposes.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-remove-timezone-information-from-datetime-object-in-python
How to remove timezone information from DateTime object in Python - GeeksforGeeks
December 9, 2021 - In this article, we are going to learn how to fix the error "datetime.datetime not JSON serializable" in Python. datetime.datetime is a class in the Python datetime module that represents a single point in time. This class is not natively supported by the JSON (JavaScript Object Notation) format, wh
🌐
DataTables
datatables.net › forums › discussion › 68465 › date-formatting-json-remove-timezone
Date formatting JSON (remove timezone) — DataTables forums
May 27, 2021 - You are using the datetime plugin. You probably need to provide the source datetime format using this syntax: $.fn.dataTable.render.moment( from, to );. You can workout the format using the moment.js format docs.