Learn how to get the milliseconds of a specified date in your desired timezone.
Moment.js is a great library if you want to work with dates and times in TypeScript. It is very handy for creating interchange representations like ISO 8601 strings, taking your current timezone into account.
Convert to milliseconds
Let’s say you live in Berlin (Germany), and you want to represent June, 26th of 2019 at midnight in milliseconds with Central European Summer Time (GMT+2). Using Moment.js v2.24 you have at least the following possibilities to do that: