This is a bit of my JS code for which this is needed:
var secDiff = Math.abs(Math.round((utc_date-this.premiere_date)/1000)); this.years = this.calculateUnit
Use Moment.js (https://momentjs.com/)
moment().isDST(); will give you if Day light savings is observed.
moment().isDST();
Also it has helper function to calculate relative time for you. You don't need to do manual calculations e.g moment("20200105", "YYYYMMDD").fromNow();
moment("20200105", "YYYYMMDD").fromNow();