Powershell Function to convert Unix Timestamp to Local Time

Sometimes you will find a “time” value in an application or database (normally on the back-end of an application) that is really a Unix Timestamp.  Also known as “EPOCH,” the timestamp represents the number of seconds that have elapsed after midnight, 1970.

Below is a function to convert a Unix Timestamp to the local timezone of the computer running it; it also considers daylight savings time.

 

Leave a Reply

Your email address will not be published.