Skip to main content

system.kanoa.asset.adjustTimeForSite

This function requires KanoaCore module

Description

Given a date, an assetPath, and the client timezone offset in hours, this function will return the date adjusted for the site (kanoaCore).

Syntax

adjustTimeForSite(dateIn, assetPath, deviceUTCOffsetHrs)
  • Parameters
      dateIn (date) - Input date to adjust.
      assetPath (string) - Asset path.
      deviceUTCOffsetHrs (float) - Client timezone offset in hours.
  • Returns
      date (date).
  • Code Examples

    # Example Usage:
    input_date = system.date.now()
    asset_path = 'Kanoa Industries\Site1'
    device_offset = 5.5
    adjusted_date = system.kanoa.asset.adjustTimeForSite(input_date, asset_path, device_offset)