I get a timestamp like below as a string:
1485661375
I need to parse it to unix timestamp and check if it is older than 8h.
I get a timestamp like below as a string:
1485661375
I need to parse it to unix timestamp and check if it is older than 8h.
[datetimeoffset]::FromUnixTimeSeconds('1485661375') -gt (get-date).AddHours(-8)
requires .NET 4.6, for converting without .NET 4.6 you can refer to this thread.