IsBusinessDay returns incorrect value for different timezones
When a user's timezone is different from the calendar's timezone, the Pega function 'isBusinessDay' returns the incorrect value. Example: The user's timezone is Australia/Adelaide. The calendar instance is defined in the America/New_York timezone. A date of 1/17/2017 is selected (which is not a business holiday but 1/16/2017 is). In this case, the isBusinessDay fn returns false as its response.
Steps to Reproduce
- Set the user's timezone to Australia/Adelaide.
- Create a Calendar instance with the America/New_York timezone. On the calendar instance, mark 1/16/2017 as a closed day.
- Have a date input and select 1/17/2017 as the date.
- Execute the onchange action on the date input to trigger a function to check if the input date is a business holiday.
- Observe the system returns false as the output of the isBusinessDay function.
When time-value is omitted, it is defaulted, and the defaulted value may fall on a different day in a different time zone.
Pass a date-time to the isBusinessDay function, not just a date.
0% found this useful