I integrated angular moment js into my angular application. I am looking to display the date and time based on the time zone of the user accessing the app. However, I am facing difficulty in applying the time zone globally throughout my application.
https://github.com/urish/angular-moment
I attempted the following approach:
angular.module('myapp').constant('angularMomentConfig', {
timezone: 'Europe/London' // for example, 'Europe/London'
});
In one of my views -
{{home.eventStart| amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a'}}
In one of my controllers -
$scope.profile.eventStart = moment(data.start).format('YYYY-MM-DD hh:mm a');
However, despite setting the time zone, I am not seeing any changes in either case. Is there something that I may have overlooked?