FlatFilers / platform-sdk-starter

Basic starter for platform sdk
5 stars 23 forks source link

fix: Fix to SmartDateField DST bug #101

Closed alexhollenbeck closed 1 year ago

alexhollenbeck commented 1 year ago

This PR fixes a bug with SmartDateField. When we convert the date back into a GMT-relative format for egress, we are using the current date to calculate the timezone offset. That only works if both the current date and the date in question are in the same state of Daylight Savings vs Standard. If one is in DST and the other is in ST, the egressed date will be off by one hour.

The fix is to get the proper timezone offset based on the passed date, instead of the current date.

codesandbox[bot] commented 1 year ago

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders