Convert DateTime to string in setReleaseTag#11209
Closed
iSazonov wants to merge 1 commit intoPowerShell:masterfrom
Closed
Convert DateTime to string in setReleaseTag#11209iSazonov wants to merge 1 commit intoPowerShell:masterfrom
iSazonov wants to merge 1 commit intoPowerShell:masterfrom
Conversation
daxian-dbw
reviewed
Dec 3, 2019
| ## 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") |
Member
There was a problem hiding this comment.
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.
Member
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Related to #11126 and #11207
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.