[Vuejs]-Vue timestamp in particular time zone

0👍

I believe this is not a Vue question, but a regular JavaScript question because Date() is built into JavaScript. When you first create the Date, it uses the time zone of the host system that created it. Then after the date is created, you can convert it to the ZULU time zone using the builtin toLocaleString function, as shown in this answer: Convert date to another timezone in JavaScript

Here is more information about toLocaleString and how it can be used to convert time zones: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString

Leave a comment