Skip to content

Convert DateTime to string in setReleaseTag - #11209

Closed
Ilya (iSazonov) wants to merge 1 commit into
PowerShell:masterfrom
iSazonov:fix-json-datetime
Closed

Convert DateTime to string in setReleaseTag#11209
Ilya (iSazonov) wants to merge 1 commit into
PowerShell:masterfrom
iSazonov:fix-json-datetime

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Nov 28, 2019

Copy link
Copy Markdown
Collaborator

PR Summary

Related to #11126 and #11207

PR Context

PR Checklist

## Get the UTC time and round up to the second.
$dateTime = [datetime]::UtcNow
$dateTime = [datetime]::new($dateTime.Ticks - ($dateTime.Ticks % [timespan]::TicksPerSecond), $dateTime.Kind)
$dateTime = $dateTime.ToString("o")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose is to get the precision up to second, like 2019-12-03T22:04:15Z. ToString("o") gives you 2019-12-03T22:04:15.0000000Z.

We don't need to address this now, as the preview.json, stable.json and lts.json will have the ReleaseDate re-set at the end of the release pipeline, where pwsh is used.
I think we need to make the build agent pre-install pwsh eventually.

@iSazonov
Ilya (iSazonov) deleted the fix-json-datetime branch December 4, 2019 02:52
@SteveL-MSFT Steve Lee (SteveL-MSFT) removed this from the 7.0.0-rc.1 milestone Dec 4, 2019
@TravisEz13

Copy link
Copy Markdown
Member

Ilya (@iSazonov) 7.0.0-rc.1 is used for PRs that are already merged into the rc.1 branch. Please do not use this milestone. Perhaps you should let one of the maintainers assign the milestone for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants