Timezone conversion doesn't change the days
Opened this issue · 0 comments
paul-mesnilgrente commented
The day of month / day of the week are not updated when changing the timezone. For example:
Cronex::ExpressionDescriptor.new('0 22 * * 1-5', {}, 'en', 'UTC').description
# => "At 10:00 PM, Monday through Friday"
Cronex::ExpressionDescriptor.new('0 22 * * 1-5', {}, 'en', 'Pacific/Auckland').description
# => "At 11:00 AM, Monday through Friday"
We can see that it's still Monday through Friday in Pacific/Auckland
when it should be Tuesday through Saturday because NZDT is 13 hours ahead (see: https://savvytime.com/converter/utc-to-nzst/mar-2-2020/10pm).
Can you think of a good way to support this? I had a look at the code but it looks pretty complicated.