'DST is accounted for when running Node.js locally but needs to be offset when running in cloud function

I have built a function that involves pulling a timestamp for Firebase Firestore for data analytic purposes.

When I run the logic locally using Node.js the timestamps already reflect the correct time at the point of them being recorded.

However, when I deploy the same logic to a Firebase function I have to offset the DST depending on when the timestamp was taken in order for it to display the correct time that was recorded.

Why is this happening?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source