File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -179,14 +179,21 @@ jobs:
179179 )
180180
181181 # Get the current date and time
182- - name : Get current date and time
183- id : datetime
184- if : env.build_trigger == 'true' # Only run if build was triggered
182+ - name : Get current date and time (Helsinki)
183+ if : env.build_trigger == 'true'
184+ shell : pwsh
185185 run : |
186- # Save the current date and time to an environment variable
187- echo "current_datetime=$(date +'%d/%m/%Y %H:%M')" >> $GITHUB_ENV
188- echo "build_timestamp=$(date +'%H:%M:%S - %d/%m/%Y')" >> $GITHUB_ENV
189-
186+ $nowUtc = Get-Date -AsUTC
187+ $tz = [TimeZoneInfo]::FindSystemTimeZoneById('FLE Standard Time') # Europe/Helsinki
188+ $now = [TimeZoneInfo]::ConvertTimeFromUtc($nowUtc, $tz)
189+
190+ " current_datetime=$($now.ToString('dd/MM/yyyy HH:mm'))" >> $env:GITHUB_ENV
191+ " build_timestamp=$($now.ToString('HH:mm:ss - dd/MM/yyyy'))" >> $env:GITHUB_ENV
192+ - name : Echo timestamp (debug)
193+ if : env.build_trigger == 'true'
194+ shell : pwsh
195+ run : echo "build_timestamp=${env:build_timestamp}"
196+
190197 # Get commits since last build
191198 - name : Get commits since last numeric CI tag
192199 id : get_commits
You can’t perform that action at this time.
0 commit comments