diff --git a/Changelog.md b/Changelog.md index b61c8f7..11f3662 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,12 @@ This page is a list of _notable_ changes made in each version. Every time a tip is added the patch version is incremented, so there will be a lot of patch version changes not documented here. +## v1.3.7 - May 20, 2024 + +Fixes: + +- Write module's last auto-update time and last auto-write tip time to file using a universal format instead of an OS-dependent format to avoid errors parsing the datetime when the module loads. + ## v1.3.0 - April 20, 2024 Features: diff --git a/src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1 b/src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1 index 903accd..fde01f2 100644 --- a/src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1 +++ b/src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1 @@ -90,7 +90,7 @@ function WriteModulesLastUpdateDate [string] $moduleUpdateDateFilePath = GetModulesLastUpdateDateFilePath Write-Verbose "Writing modules last update date '$ModulesLastUpdateDate' to '$moduleUpdateDateFilePath'." - [System.IO.File]::WriteAllText($moduleUpdateDateFilePath, $ModulesLastUpdateDate.ToString()) + [System.IO.File]::WriteAllText($moduleUpdateDateFilePath, $ModulesLastUpdateDate.ToString('o')) } function GetModulesLastUpdateDateFilePath diff --git a/src/tiPS/Private/AutomaticWritePowerShellTipFunctions.ps1 b/src/tiPS/Private/AutomaticWritePowerShellTipFunctions.ps1 index e681859..aa0e1c8 100644 --- a/src/tiPS/Private/AutomaticWritePowerShellTipFunctions.ps1 +++ b/src/tiPS/Private/AutomaticWritePowerShellTipFunctions.ps1 @@ -122,7 +122,7 @@ function WriteLastAutomaticTipWrittenDate [string] $lastAutomaticTipWrittenDateFilePath = GetLastAutomaticTipWrittenDateFilePath Write-Verbose "Writing last automatic tip Written date '$LastAutomaticTipWrittenDate' to '$lastAutomaticTipWrittenDateFilePath'." - [System.IO.File]::WriteAllText($lastAutomaticTipWrittenDateFilePath, $LastAutomaticTipWrittenDate.ToString()) + [System.IO.File]::WriteAllText($lastAutomaticTipWrittenDateFilePath, $LastAutomaticTipWrittenDate.ToString('o')) } function GetLastAutomaticTipWrittenDateFilePath