From 60519c45886030afedc50bdbc6ac507e77b63570 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Tue, 9 Dec 2025 13:13:46 -0500 Subject: [PATCH] Fix lastBootUpTime datetime format for MySQL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PowerShell was sending datetime in US locale format (12/7/2025 10:05:28 PM) but MySQL requires ISO format (YYYY-MM-DD HH:MM:SS). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- scripts/Update-PC-CompleteAsset.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/Update-PC-CompleteAsset.ps1 b/scripts/Update-PC-CompleteAsset.ps1 index f874d6e..195cd75 100644 --- a/scripts/Update-PC-CompleteAsset.ps1 +++ b/scripts/Update-PC-CompleteAsset.ps1 @@ -1111,7 +1111,10 @@ function Send-CompleteDataToDashboard { totalPhysicalMemory = $SystemInfo.TotalPhysicalMemory domainRole = $SystemInfo.DomainRole currentTimeZone = $SystemInfo.CurrentTimeZone - lastBootUpTime = $SystemInfo.LastBootUpTime + # Format lastBootUpTime as MySQL datetime (YYYY-MM-DD HH:MM:SS) + lastBootUpTime = if ($SystemInfo.LastBootUpTime) { + $SystemInfo.LastBootUpTime.ToString("yyyy-MM-dd HH:mm:ss") + } else { $null } } # Add warranty data if available