LocalTimezone

Overview

This component plug-in reads the time zone of the users local machine and provides a UI component to write this information into a local variable.

This plugin can be used to support the use case were the users need to be informed if their Appian time zone differs from their local time zone.

Key Features & Functionality

The UI component reads the local time zone with the JS function Intl.DateTimeFormat().resolvedOptions().timeZone. The output is send back to Appian and can be stored in a local variable.

Example Sail code for interface:


a!localVariables(
    local!tzStr: "-",
{
    a!sectionLayout(
      contents:
    {
        localTZField(
          localTZStrSaveInto: a!save(local!tzStr, save!value)
      ),
        a!textField(
          label: "User TZ",
          labelPosition: "ADJACENT",
          value: usertimezone(loggedInUser()),
          readOnly: true
       ),
        a!textField(
           label: "Local TZ",
           labelPosition: "ADJACENT",
           value: local!tzStr,
           readOnly: true
          )
        }
      )
    }
 )

Anonymous