Changing culture settings is not taken into account in the PowerShell Extension's PowerShell instance
@andyleejordan arbeitet bereits daran.
Seit 11.10.2023.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
Changing the culture's settings such as the time format has no effect in the PowerShell Extension:
PowerShell Version
PSVersion 7.3.7
PSEdition Core
GitCommitId 7.3.7
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
1.82.2
abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
x64
Extension Version
ms-vscode.powershell@2023.9.4
TylerLeonhardt.vscode-inline-values-powershell@0.0.7
Steps to Reproduce
From the PowerShell Extension's PowerShell prompt, run the following script:
# derived from https://github.com/PowerShell/PowerShell/issues/19536#issuecomment-1515140128
# Save the original culture.
$global:originalculture = [cultureinfo]::CurrentCulture
# Temporarily replace it with a read/write copy.
[cultureinfo]::CurrentCulture = [cultureinfo] $global:originalculture.Name
# Modify the LongTimePattern format to include milliseconds.
[cultureinfo]::CurrentCulture.DateTimeFormat.LongTimePattern += ([cultureinfo]::CurrentCulture.NumberFormat.CurrencyDecimalSeparator + 'fff')
This has no effect to e.g. the output from Get-Date:
PS> Set-LongTimePatternToIncludeMilliseconds.ps1
PS> Get-Date
Saturday, September 30, 2023 12:23:05
Whereas the result is correct in a "normal" PowerShell instance:
PS> Set-LongTimePatternToIncludeMilliseconds.ps1
PS> get-date
Saturday, September 30, 2023 12:24:17.297
Visuals
No response
Logs
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.9k
- Forks
- 548
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/vscode-powershell
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
PowerShell/vscode-powershell#5599 · 3 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PowerShell/vscode-powershell#5592 · 2 Kommentare · 1 Reaktion ·
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
PowerShell/vscode-powershell#5583 · 1 Kommentar ·
-
powershell.scriptAnalysis.settingsPath (Description): Warning Message Should Provide A Workaround OffenArea-Code Formatting Issue-Enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
PowerShell/vscode-powershell#4653 · 3 Kommentare · 4 Reaktionen ·
-
nothing OffenIssue-Bug Needs: Triage
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 5/100
PowerShell/vscode-powershell#5603 · 1 Reaktion ·
Alle Issues in PowerShell/vscode-powershell
Ähnliche Issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
vercel/react-tweet#225 ·