I have the following strings on my NodeJS server, which is uses UTC time.
const year = '2021';
const month = '05';
const day = '28';
const hour = '17';
const minute = '40';
const second = '00';
If I now create a Date object like so new Date(year, month, day, hour, minute, second)
it obviously creates the Date object for UTC. However, the strings I'm parsing are were recorded in CET and not UTC.
How can I parse the information, like shown above, as Date for a given timezone on a server that is set to UTC? I also need to respect summer- and wintertime for the respective time zones.
Afterwards, I actually need to convert that Date object to UTC as I need it as UTC timestamp to send it to an external system.
I have quite a hard time wrapping my head around it. Thanks!