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 ?
Is anyone going to be using this feature outside of your current local time zone? Is that going to cause issues for you if you're storing the local time on the server? In all but a very few very small edge cases you are going to want to store the date in UTC with the time zone designation and then convert it to local time on the client. More on reddit.com
🌐 r/learnjavascript
6
0
May 7, 2025
Question regarding dates and time zones
Had the same issue, our DB and servers are set to UTC but in browser they're set to user timezone, which JS always assumes. To ensure JS knows what timezone the time you're providing is in, append it to the end of your timestamp. For example: new Date(myTimestamp + " UTC"). Yep, looks horrific but is a valid and recommended solution apparently. Welcome to JavaScript! Also be sure to check Safari support as the wah Safari handles dates is very messed up. More on reddit.com
🌐 r/learnjavascript
17
2
August 10, 2023
🌐
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
July 10, 2025 - 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
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Intl › DateTimeFormat › DateTimeFormat
Intl.DateTimeFormat() constructor - JavaScript | MDN
January 21, 2026 - Possible values are "h11", "h12", "h23", and "h24"; the default is inferred from hour12 and locale. This option can also be set through the hc Unicode extension key; if both are provided, this options property takes precedence. ... The time zone to use. Can be any IANA time zone name, including named identifiers such as "UTC", "America/New_York", and "Etc/GMT+8", and offset identifiers such as "+01:00", "-2359", and "+23". The default is the runtime's time zone, the same time zone used by Date.prototype.toString().
🌐
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.
🌐
CoreUI
coreui.io › blog › how-to-manage-date-and-time-in-specific-timezones-using-javascript
How to Manage Date and Time in Specific Timezones Using JavaScript · CoreUI
January 22, 2025 - JavaScript provides native methods and modern APIs to simplify this task, but challenges like daylight saving time, timezone offsets, and formatting can still cause issues. ... In this guide, you’ll learn how to set, convert, and format JavaScript dates in specific timezones effectively.
🌐
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 » ·
🌐
TutorialsPoint
tutorialspoint.com › how-to-remove-time-from-date-typescript
How to remove Time from Date TypeScript?
September 4, 2023 - The JavaScript code will produce the following output ? ... One benefit of using this method is its simplicity. The date in the desired format can be easily retrieved by calling the toLocaleDateString() method on a Date object.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-remove-time-from-date-using-javascript
How to remove time from date using JavaScript ? | GeeksforGeeks
June 20, 2023 - This ensures that the displayed time aligns with the selected timezone, often using built-in methods or external libraries.1. Using Intl.DateTimeFormat() and format( ... Given a date and the task is to check whether the given date is less than 1 hour ago or not with the help of JavaScript.
🌐
Telerik
docs.telerik.com › javascript › timezone › remove
remove - API Reference - Kendo UI timezone - Documentation
<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.
🌐
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
December 12, 2022 - 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.