Timezones is constant pain in every datetime library I tried. So here's the question, suppose you have a UTC datetime provided as string: 2019-06-25T05:00:00Z. How do you create a UTC DateTime object out of it (I use luxon, but answer can be in terms of any library)?
console.info(luxon.DateTime.fromISO('2019-06-25T05:00:00Z').toSQL());
<script src="https://moment.github.io/luxon/global/luxon.min.js"></script>
When I run the snippet above I get:
2019-06-25 09:00:00.000 +04:00 // local timezone
While I need:
2019-06-25 05:00:00.000 -00:00 // UTC