You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script converts a Git commit timestamp to a human-readable date format and is intended for use in build processes.
.DESCRIPTION
The script takes a Git commit timestamp as input and converts it into a standardized date format ("yyyy-MM-ddTHH:mm:ssK"). It's designed to be run as part of an automated build process, specifically within MSBuild tasks, to generate and use date information from Git commits.
.NOTES
The script is intended to be called from an MSBuild task, but can be used in any context where a Git commit timestamp needs to be converted to a human-readable date.
This example shows how to call the script from an MSBuild task, passing a Git commit timestamp as an argument. The `-NoProfile` and `-ExecutionPolicy Bypass` flags ensure a clean and unrestricted execution environment.
.AUTHOR
Steven T. Cramer
#>
# Assuming GitCommitTimestamp is passed as an argument to the script
param(
[int64]$GitCommitTimestamp
)
# Convert GitCommitTimestamp to a human-readable date