Exploring the impact of passing on the local timezone parameter versus not passing the filter timezone parameter in AngularJS.
var timezoneLocal = new Date().getTimezoneOffset().toString(); // "-480"
var dateUCT = "2018-09-22T11:19:08Z";
var formatDate = "dd/MM/yyyy hh:mm";
var formatWithTimeZone = $filter('date')(dateUCT, formatDate, timezoneLocal); // "22/09/2018 05:59"
var formatWithoutTimezone = $filter('date')(dateUCT, formatDate); // "22/09/2018 07:19"
It's commonly understood that if the timezone is not passed, the default is set to the local timezone. However, discrepancies arise when going live without transmitting it. Why does this happen?
What causes these inconsistencies?