private/Functions/Axis/Get-AxisDataTime.ps1

#https://$($ip)/stw-cgi/system.cgi?msubmenu=date&action=set&TimeZoneIndex=$($sitetimezone)&DSTEnable=True
#https://$($ip)/stw-cgi/system.cgi?msubmenu=date&action=set&SyncType=NTP&NTPURLList=$($NTPServerIp),time.nist.gov

Function Get-AxisDateTime {
    [cmdletBinding()]
    Param(
        [Parameter()]
        [hashtable]$Object
    )

    <#
    Object Definition:
    @{
        IP = [String(Mandatory)]
        Credential = [PSCredential(Mandatory)]
    }
    #>


    #Set basic Paramters for Invoke-AxisCommand
    $CamCmd = @{
        Arguments = @{
            IP = $Object.IP
            Menu = 'system'
            SubMenu = 'date'
            Action = 'view'
            Parameters = @()
        }
        Credential = $Object.Credential
    }

    $result = Invoke-AxisCommand @CamCmd

    $output = [ordered]@{
        LocalTime = $result.LocalTime

    }

    #Calculate Timezone
    $tz = $result.TimeZoneIndex
    if($result.DSTEnable) {
        $output.Add('TimeZone',$AxisTimeZoneIndexs["$($tz)D"])
    }
    else {
        $output.Add('TimeZone',$AxisTimeZoneIndexs["$($tz)S"])
    }

    #Calculate NTP Status
    if($result.SyncType -eq 'NTP') {
        $output.Add('NTPServers',$result.NTPURLList)
    }
    else {
        $output.Add('NTPServers','Disabled')
    }

    #Output
    return [pscustomobject]$output
}