Skip to main content

system.kanoa.schedule.decodeScheduleBlock

This function requires KanoaOPS module

Description

Decodes the passed-in event record using the startDate and rruleStr.

Syntax

decodeScheduleBlock(scheduleBlock, rangeStart, rangeEnd, deviceUTCOffsetHrs=0, siteOffsetMins=0)
  • Parameters
      scheduleBlock (dictionary) - Schedule block details.
      rangeStart (datetime) - Start of the range.
      rangeEnd (datetime) - End of the range.
      deviceUTCOffsetHrs (float, default=0) - Device UTC offset in hours.
      siteOffsetMins (int, default=0) - Site offset in minutes.
  • Returns
      List of datetimes (eventTimeList).
  • Code Example

    # Example Usage:
    schedule_block = {...} # Replace with actual schedule block details
    range_start = ...
    range_end = ...
    device_utc_offset_hrs = 5.5
    site_offset_mins = 300
    event_times = system.kanoa.schedule.decodeScheduleBlock(schedule_block, range_start, range_end, device_utc_offset_hrs, site_offset_mins)