Currently supplying a Date to the constructor of UTCDate or to the function utc just creates a UTCDate object and sets the timezone offset property to 0, but it doesn't actually convert said time to UTC.
It would be useful if there would be a function that took said date, and not only created the UTCDate but also that it offset the time by it's timezone offset to actually convert it to UTC.
example:
export const toUtcDate = (date: Date) => new UTCDate(date.getTime() - date.getTimezoneOffset() * 60 * 1000);
Currently supplying a Date to the constructor of UTCDate or to the function utc just creates a UTCDate object and sets the timezone offset property to 0, but it doesn't actually convert said time to UTC.
It would be useful if there would be a function that took said date, and not only created the UTCDate but also that it offset the time by it's timezone offset to actually convert it to UTC.
example: