[Vuejs]-Moment JS get difference in Timezone for countdown

0👍

use UTC if you use UTC its the universal timezone. Then when a user looks at the time it will subtract for there timezone and keep a universal time while showing each time zone correctly. https://www.nhc.noaa.gov/aboututc.shtml

moment.utc(yourDate).format()

0👍

yes here is an example from UTC to local:

var date = moment.utc().format();
console.log(date, "- now in UTC"); 

var local = moment.utc(date).local().format();
console.log(local, "- UTC now to local"); 
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>

Leave a comment