Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sys.setlocale returns the updated locale, not the previous one #1035

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

aronatkins
Copy link
Contributor

@aronatkins aronatkins commented Jan 17, 2024

As identified by 972dc8d#r137282282.

@Upipa, would you be able to test this change? It closely resembles your suggestion.

@aronatkins aronatkins changed the title LSys.setlocale returns the updated locale, not the previous one Sys.setlocale returns the updated locale, not the previous one Jan 17, 2024
aronatkins referenced this pull request Jan 17, 2024
* Restyle and reorder functions
* Eliminate `httpInvokeRequest()`
* Extract out repeated code and test new `authHeaders()` function
* Standardise structure of `httpRequest()` and `httpRequestWithBody()`
@@ -518,10 +518,11 @@ signatureHeaders <- function(authInfo, method, path, file = NULL) {

rfc2616Date <- function(time = Sys.time()) {
# set locale to POSIX/C to ensure ASCII date
old <- Sys.setlocale("LC_TIME", "C")
old <- Sys.getlocale("LC_TIME")
Copy link
Member

Choose a reason for hiding this comment

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

Of course Sys.setlocale() works differently 😭

@aronatkins
Copy link
Contributor Author

Note: The CI failures are unrelated to this change; there's an active Posit Package Manager problem. Will re-run CI once that clears.

@aronatkins aronatkins merged commit 2eae8dd into main Jan 17, 2024
10 checks passed
@aronatkins aronatkins deleted the aron-properly-restore-locale branch January 17, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants