Yes, it's possible you need to calculate time zone offset and add then add to your date object time sample code is given below.

var d = new Date('2016-06-15 10:59:53.5055');
    var timeZoneDifference = (d.getTimezoneOffset() / 60) * -1; //convert to positive value.
    d.setTime(d.getTime() + (timeZoneDifference * 60) * 60 * 1000);
    d.toISOString()
Answer from Narayan Sikarwar on Stack Overflow
🌐
Telerik
telerik.com › knowledge base › managing time zones with the dateinputs components
Angular Managing Time Zones with the DateInputs Components - Kendo UI for Angular
January 20, 2026 - As a result, the applied time offset ... details, see the following GitHib issue. To remove the time zone information from a Date object, use the toISOString() method....
🌐
Syncfusion
ej2.syncfusion.com › angular › documentation › schedule › timezone
Timezone in Angular Schedule component | Syncfusion
Removes the local timezone offset from the given date. Returns Date · // Assume your local timezone as IST/UTC+05:30 let timezone: Timezone = new Timezone(); let date: Date = new Date(2018,11,5,15,25,11); let convertedDate: Date = timezone.removeLocalOffset(date); console.log(convertedDate); //2018-12-05T15:25:11.000Z · You can refer to our Angular Scheduler feature tour page for its groundbreaking feature representations.
🌐
DEV Community
dev.to › shubhampatilsd › removing-timezones-from-dates-in-javascript-46ah
Removing Timezones from Dates in Javascript - DEV Community
April 23, 2023 - First tzoffset initializes a new Date and get the timezone offset in milliseconds (in my case, it would be 28800000 milliseconds). Then, we subtract that from the value of date, which was 10:30 PM, so it would now be 4:30 PM.
🌐
Reddit
reddit.com › r/angular2 › using angular date pipe will convert my time, how can i prevent the conversion?
r/Angular2 on Reddit: Using Angular date pipe will convert my time, how can I prevent the conversion?
April 6, 2021 -

I have a time stamp that I got from the server side.

The time before using the date pipe is : 2021-04-01T20:45:30.279+0000 ( html code:

<td mat-cell \*matCellDef="let element"> {{element.when }} </td> )

The time after I used date pipe: 01-Apr-2021 13:45:30

( html code: <td mat-cell *matCellDef="let element"> {{element.when | date: 'dd-MMM-yyyy HH:mm:ss'}} </td> )

The hour is different after using the date pipe. How can I stop it's conversion?

Thank you!

🌐
Reddit
reddit.com › r/angular › formatting dates/times in specified timezone
r/angular on Reddit: Formatting Dates/Times in Specified Timezone
September 15, 2022 -

Hi all,

I've got myself in a bit of a pickle, and I'm hoping you kind souls can give me some advice.

I have an application where I want to show the time of an event in a specific time zone (this is neither UTC or local time). I've done this before using moment, but as it is in maintenance mode, I need to move on from it - I have currently been using Luxon, but this can be changed if other libraries are the answer.

My situation:

  • I start with a number, representing the number of milliseconds since the start of the epoch. This is read from a database (sample value: 1659222000000 - representing Saturday, 30 July 2022 23:00:00 in UTC/GMT)

  • I am in "Europe/London" time zone (Sunday, 31 July 2022 00:00:00)

  • I want to output the date/time for the "America/New_York" time zone (regardless of my browsers time zone: Saturday, 30 July 2022 19:00:00)

Does anyone have any bright ideas for how I can get it to show the time in New York instead of the time in London?

Thank you in advance!

🌐
Plunker
embed.plnkr.co › plunk › ksXqXp
Angular strap timezones solved - Plunker
Did you forget to include moment-timezone.js?'); } } return aMoment; } }]) .filter('ngmDateFormat', ['moment', 'ngmTimeCalc', 'ngMomentConfig', function (moment, ngmTimeCalc, ngMomentConfig) { function ngmDateFormatFilter(value, format, timezone, preprocess) { if (typeof value === 'undefined' || value === null) { return ''; } var date; var preprocessedValue; if (typeof value === 'string') { preprocessedValue = ngmTimeCalc.preprocessDate(value, preprocess,'YYYY-MM-DDTHH:mm:ss'); date = moment(preprocessedValue); if (!date.isValid()) { return ''; } } else if (Object.prototype.toString.call(value
Find elsewhere
🌐
GitHub
github.com › angular › angular › issues › 49540
Datepipe formating with timezone - incorrect date in date when is winter time changed to summer time · Issue #49540 · angular/angular
March 22, 2023 - this.dates.push(new Date('2022-03-27T00:00:00.000Z')); this.dates.push(new Date('2022-03-27T01:00:00.000Z')); this.dates.push(new Date('2022-03-27T02:00:00.000Z')); this.dates.push(new Date('2022-03-27T03:00:00.000Z')); this.dates.push(new Date('2021-03-28T00:00:00.000Z')); this.dates.push(new Date('2021-03-28T01:00:00.000Z')); this.dates.push(new Date('2021-03-28T02:00:00.000Z')); this.dates.push(new Date('2021-03-28T03:00:00.000Z')); this.dates.push(new Date('2020-03-29T00:00:00.000Z')); this.dates.push(new Date('2020-03-29T01:00:00.000Z')); this.dates.push(new Date('2020-03-29T02:00:00.000Z
Author   MartinMilata
🌐
Angular
v17.angular.io › api › common › formatDate
Angular
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces with Angular.
Top answer
1 of 4
97

Since version 1.3.0 AngularJS introduced extra filter parameter timezone, like following:

{{ date_expression | date : format : timezone}}

But in versions 1.3.x only supported timezone is UTC, which can be used as following:

{{ someDate | date: 'MMM d, y H:mm:ss' : 'UTC' }}

Since version 1.4.0-rc.0 AngularJS supports other timezones too. I was not testing all possible timezones, but here's for example how you can get date in Japan Standard Time (JSP, GMT +9):

{{ clock | date: 'MMM d, y H:mm:ss' : '+0900' }}

Here you can find documentation of AngularJS date filters.

NOTE: this is working only with Angular 1.x

Here's working example

2 of 4
31

The 'Z' is what adds the timezone info. As for output UTC, that seems to be the subject of some confusion -- people seem to gravitate toward moment.js.

Borrowing from this answer, you could do something like this without moment.js:

controller

var app1 = angular.module('app1',[]);

app1.controller('ctrl',['$scope',function($scope){

  var toUTCDate = function(date){
    var _utc = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(),  date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
    return _utc;
  };

  var millisToUTCDate = function(millis){
    return toUTCDate(new Date(millis));
  };

    $scope.toUTCDate = toUTCDate;
    $scope.millisToUTCDate = millisToUTCDate;

  }]);

template

<html ng-app="app1">

  <head>
    <script data-require="angular.js@*" data-semver="1.2.12" src="http://code.angularjs.org/1.2.12/angular.js"></script>
    <link rel="stylesheet" href="style.css" />
    <script src="script.js"></script>
  </head>

  <body>
    <div ng-controller="ctrl">
      <div>
      utc {{millisToUTCDate(1400167800) | date:'dd-M-yyyy H:mm'}}
      </div>
      <div>
      local {{1400167800 | date:'dd-M-yyyy H:mm'}}
      </div>
    </div>
  </body>

</html>

here's plunker to play with it

See also this and this.

Also note that with this method, if you use the 'Z' from Angular's date filter, it seems it will still print your local timezone offset.

🌐
Stack Overflow
stackoverflow.com › questions › 33787758 › ignoring-time-zone-in-date-object-returned-from-an-api-using-angular
Ignoring time zone in date object returned from an API using Angular
When I display the date I use two filters, mine and the angular date filter to properly format it. <span class="list-content col-sm-6">{{appointment.ApptDateTime | formattedDate | date:'MMM dd, yyyy hh:mm a'}}</span> The problem I'm having is the time is adjusting based off the users current time zone. I want to ignore this and instead use the value as it's returned with out altering it. I notice that depending on the timezone of the computer the response from the API changes the returned date.
🌐
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
🌐
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.
🌐
Telerik
telerik.com › components › date math › timezones
Angular Date Math Timezones - Kendo UI for Angular
The Date Math package enables you to load a timezone data for a specific city, continent, or for the whole world. This could be used for adding or removing a specific time offset from the JavaScript Date value.
🌐
Syncfusion
syncfusion.com › forums › 156983 › schedule-disable-timezone-and-utc-time-offset
Schedule: Disable Timezone and UTC time offset | Angular - EJ 2 Forums | Syncfusion®
August 18, 2020 - We have validated your shared query “I would like to disable the timezone fields as well as the UTC offset that is applied to the Start and End dates before they are saved to the DataSource” at our end. And we suspect that your requirement is to disable the timezone filed in the editor window and if we disabled those fields then the user can’t able to change the time zone for the event while creating/editing it. And for the same, we have prepared a sample using CSS Property and it can be viewed from the following link. Sample: https://stackblitz.com/edit/angular-uumksh-beajjo?file=app.component.html