psPAS icon indicating copy to clipboard operation
psPAS copied to clipboard

Get-PASAccount non-unix timestamp

Open redboyhun opened this issue 2 years ago • 2 comments

It would be nice if the Get-PASAccount function (and any related functions having dates) would print date times in "human readable format" like "yyyy.MM.dd HH:mm:ss"

Now I get like: AccountID : 123_123 Safe : SomeSafe address : some.address userName : someuser name : someobjectname platformId : SomePlatform secretType : password platformAccountProperties : @{LogonDomain=acme} secretManagement : @{automaticManagementEnabled=True; status=success; lastModifiedTime=1722505643; lastReconciledTime=1722505537; lastVerifiedTime=1722536550} createdTime : 30/07/2024 14:53:18 categoryModificationTime : 01/08/2024 11:24:17

redboyhun avatar Aug 01 '24 15:08 redboyhun

No change since the last discussion on the topic: https://github.com/pspete/psPAS/discussions/466 Happy to accept a pull request which gets formats to apply to nested datetime properties...

pspete avatar Aug 01 '24 20:08 pspete

maybe the easiest would be if they are defined like createdTime in the "root" `...

      <Label>lastVerified</Label>

      <ScriptBlock>(get-date 1/1/1970).addseconds($_.secretManagement.lastVerifiedTime)</ScriptBlock>

  </ListItem>

  <ListItem>

      <Label>lastModified</Label>

      <ScriptBlock>(get-date 1/1/1970).addseconds($_.secretManagement.lastModifiedTime)</ScriptBlock>

  </ListItem>

  <ListItem>

      <Label>lastReconciled</Label>

      <ScriptBlock>(get-date 1/1/1970).addseconds($_.secretManagement.lastReconciledTime)</ScriptBlock>

  </ListItem>

...`

redboyhun avatar Aug 13 '24 13:08 redboyhun