//Currently only USA
const ALL_OFFSETS = [-4, -5, -6, -7, -8, -9, -10, -11, 10]
The comment is not accurate, by the way, because +10 is Australia eastern time.
This is used to establish which timezones are within texting hours at the current point in time relative to configured or default texting hours.
I see no reason not to just compute this for all offsets. It's probably a small optimization.
That having been said, if we're going to keep this, make it configurable so Spoke is portable to other regions without requiring a code change.
There are other ways to make this work without a list and without configuration, such as determining, for the current point in time, the easternmost and westernmost timezones that are within texting hours. That way we wouldn't have 2 lists with a total of 24 timezones, which I think is probably what they were trying to optimize for.
@lperson this was never done, was it?
@ibrand short answer: yup, it was never done. There hasn't been a real use case for doing it in the 2 years that have elapsed since I create the issue.
Related issue: https://github.com/MoveOnOrg/Spoke/issues/491
Most helpful comment
@ibrand short answer: yup, it was never done. There hasn't been a real use case for doing it in the 2 years that have elapsed since I create the issue.