Skip to content

Commit

Permalink
Merge pull request #61 from deadlydog/IgnoreLocalWhenWritingDateTimeT…
Browse files Browse the repository at this point in the history
…oFile

fix: Write time using round-trip format instead of OS-specific format to avoid parse errors
  • Loading branch information
deadlydog authored May 20, 2024
2 parents f04be35 + ce4916f commit 14083aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tiPS/Private/AutomaticWritePowerShellTipFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14083aa

Please sign in to comment.