Title: Some fixes in Get-Date -UFormat by iSazonov · Pull Request #6542 · PowerShell/PowerShell · GitHub
Open Graph Title: Some fixes in Get-Date -UFormat by iSazonov · Pull Request #6542 · PowerShell/PowerShell
X Title: Some fixes in Get-Date -UFormat by iSazonov · Pull Request #6542 · PowerShell/PowerShell
Description: PR Summary In #4805 we fixed some formats for -Uformat. Here we collect fixes of returned values for -Uformat. Fix %s value Address the comment We use local datetime in evaluating %s format and UTC in epoch constant so returned value contains time zone shift compared to the value returned by Unix date utility. In the PR we convert local datetime to UTC. https://stackoverflow.com/questions/2883576/how-do-you-convert-epoch-time-in-c Fix %l uformat Currently we have 0 .. 11 format. Right format is 1..12 See http://man7.org/linux/man-pages/man1/date.1.html Fix %V uformat PowerShell Committee conclusion #4508 (comment) Currently we use simple formula. Right algorifm is described in https://en.wikipedia.org/wiki/ISO_week_date#Relation_with_the_Gregorian_calendar Output format is changed from 1..53 to 01..53. See http://man7.org/linux/man-pages/man1/date.1.html Previous discussion. .Net haven't ISO-compatible implementation. I opened Issue in .Net Core repo https://github.com/dotnet/corefx/issues/28808 and get recomendation to use the workaround https://blogs.msdn.microsoft.com/shawnste/2006/01/24/iso-8601-week-of-year-format-in-microsoft-net/ with corrections based on comments. PR Checklist PR has a meaningful title Use the present tense and imperative mood when describing your changes Summarized changes Change is not breaking Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header This PR is ready to merge and is not Work in Progress. If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready. User-facing changes Not Applicable OR User-facing Documentation needed Issue filed - Issue link: Testing - New and feature Not Applicable or can only be tested interactively OR Make sure you've added a new test if existing tests do not effectively test the code changed Add [feature] if the change is significant or affects feature tests
Open Graph Description: PR Summary In #4805 we fixed some formats for -Uformat. Here we collect fixes of returned values for -Uformat. Fix %s value Address the comment We use local datetime in evaluating %s format and U...
X Description: PR Summary In #4805 we fixed some formats for -Uformat. Here we collect fixes of returned values for -Uformat. Fix %s value Address the comment We use local datetime in evaluating %s format and U...
Opengraph URL: https://github.com/PowerShell/PowerShell/pull/6542
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:307671f8-ba5f-eee2-01b3-fc7d72e8e31d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E0EC:135D4D:10B5CF:1632D6:6A5533BD |
| html-safe-nonce | 146df0fde853f43bc97d2a3e8af1060ee626af61e058efe01f282b37fc23b92e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEVDOjEzNUQ0RDoxMEI1Q0Y6MTYzMkQ2OjZBNTUzM0JEIiwidmlzaXRvcl9pZCI6IjU2NTUwODkwMTEyNzYxOTg4NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d06b9f48294d13932574d1b4d96f86aa90cddd6f8d870989b6160e44ebc47174 |
| hovercard-subject-tag | pull_request:178830401 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/pull/6542/files |
| twitter:image | https://avatars.githubusercontent.com/u/22290914?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/22290914?s=400&v=4 |
| og:image:alt | PR Summary In #4805 we fixed some formats for -Uformat. Here we collect fixes of returned values for -Uformat. Fix %s value Address the comment We use local datetime in evaluating %s format and U... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fbd8fce4d63ac394c5405faa20aa50d5c9e56b979ac43ee1b26f8e7c47c4cd89 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf96660b44878f418b09d3d6ecde00ad62332910 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width