Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolateyGH-1604) Fix DateTime formatting issue in Env:ChocolateyLa…
…stPathUpdate Due to the DateTime format used this would cause all kinds of issues when a tool or environment uses the environment variables. For example, a python script that reads all environment variables on a system with a Swedish DateTime culture set and tries to serialize the key/values as JSON would/could error out when a ÅÄ or Ö is written by choco into ChocolateyLastPathUpdate, it's also a hard bug to track down since in the Swedish case it would only trigger on a Saturday, Sunday or Monday where mentioned chars would appear. This change changes the formatting used to force it to a long in the form of using ToFileTime() on the returned Date object instead of the formatting flags used before the change.
- Loading branch information