From 84bc50a61b206bd3482d4e90bb0d6200f3914345 Mon Sep 17 00:00:00 2001 From: Timothy Gruber Date: Fri, 31 May 2024 20:58:41 -0700 Subject: [PATCH] fix: system.datetime error in Azure blob upload --- Private/Invoke-AzureStorageBlobUpload.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Private/Invoke-AzureStorageBlobUpload.ps1 b/Private/Invoke-AzureStorageBlobUpload.ps1 index a0e3c56..ec1f94d 100644 --- a/Private/Invoke-AzureStorageBlobUpload.ps1 +++ b/Private/Invoke-AzureStorageBlobUpload.ps1 @@ -55,7 +55,7 @@ function Invoke-AzureStorageBlobUpload { $UTCDateTime = (Get-Date).ToUniversalTime() # Determine the token expiration count as minutes - $TokenExpireMinutes = [System.Math]::Round(([datetime]$Global:AccessToken.ExpiresOn.ToUniversalTime().UtcDateTime - $UTCDateTime).TotalMinutes) + $TokenExpireMinutes = [System.Math]::Round(([datetime]$Global:AccessToken.ExpiresOn.ToUniversalTime() - $UTCDateTime).TotalMinutes) # Determine if refresh of access token is required when expiration count is less than or equal to minimum age if ($TokenExpireMinutes -le 10) {