Skip to content

Commit

Permalink
simplified fileTime transform
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Apr 20, 2023
1 parent cbebdb5 commit 29a460b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Transforms/fileTime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ $codeBlock.OnSave = {
#standard expiration
if($value -is [datetime]) {
$Value.ToFileTimeUtc()
continue;
}
#values that did not transform to DateTime in OnLoad
if($value -is [string]) {
$value
}
if($value -is [Int64])
else
{
#values that did not transform to DateTime in OnLoad -> return as-is as string
"$value"
}
}
Expand Down

0 comments on commit 29a460b

Please sign in to comment.