Check if date falls under schedule for specific timezone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 05:24 AM
Hi Community,
I need help with the code to check if date falls under schedule for specific timezone.
I am using isInSchedule() method, for some reason its not giving correct output, I have used this several times in past not sure why its giving me hard time now, may be i am missing some small point.
Tried various approaches:-
1.Basic approach to use getDisplayValue to get user's session timezone.
2. Another approach is to convert time zone and then give in isInSchedule method, for this i tried setTZ() and setTimeZone() both method, both are converting properly and getting output as per timezone only however schedule function is still not returning correct output.
Please let me know what i am missing here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 09:59 PM
Hi Amit,
Thanks for your response, however there are no excluded child schedules or conflicting entries, i am using simple Mon-friday weekday schedule.
Regards,
Muskan Dixit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 11:18 PM
I tried it using the Schedule 8-5 weekdays and I am able to get the correct output. Refer below screenshot -
Could you please confirm which schedule you are referring to ? Also, is it OOB or a newly created one ? If newly created, could you please share the schedule configuration via screenshots.
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 07:38 AM
Hi Amit,
For my requirement i need to validate start date with two different schedules which are in different timezones ( US & IST).
Also just to understand, in your screenshot it displays time around 11 pm and you said schedule is of 8-5pm, in that case it should return false right or your schedule time is different?
Regards,
Muskan Dixit