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

Problème d'affichage des dates #505

Open
TanguyBarthelemy opened this issue Feb 12, 2024 · 1 comment
Open

Problème d'affichage des dates #505

TanguyBarthelemy opened this issue Feb 12, 2024 · 1 comment

Comments

@TanguyBarthelemy
Copy link
Contributor

Suite à la publication de la fiche sur les données temporelles, quelques affichages ne passent pas très bien entre R 4.3 (Windows) et R 4.2.3 (Ubuntu) :

J'ai repéré 3 problèmes :

Neil Armstrong a posé le pied sur la lune le 1969-07-21 02:56:20 à Paris.

En fait il était 3h56 à Paris.
Ainsi je propose le changement suivant :

# changement du fuseau horaire avec le package base
heure_en_france <- pied_sur_la_lune
attr(heure_en_france , "tzone") <- "Europe/Paris"

# changement du fuseau horaire avec le package lubridate
heure_los_angeles <- lubridate::with_tz(pied_sur_la_lune, tzone = "America/Los_Angeles")
chute_mur_berlin <- as.POSIXct(x = "1989-11-09 18:00", tz = "Europe/Berlin")

# Heure locale
print(chute_mur_berlin)

# Heure UTC (exemple en islande)
print(chute_mur_berlin, tz = "UTC")
# définition en date et heure locale avec le bon fuseau horaire
victoire_fifa_1998 <- as.POSIXct(x = "1998-07-12 21:00", tz = "Europe/Paris")

# Heure locale
print(victoire_fifa_1998)

# Heure UTC (exemple au Burkina Faso)
print(victoire_fifa_1998, tz = "UTC")
  • Enfin concernant le paragraphe Autres fonctions
    Aucun changement de locale ne fonctionne et toutes les dates sont en anglais.
    Pour cette issue là, je n'ai trouvé aucune solution (je pense qu'il faut installer les locale manquante (fr_FR.utf8) lors du render du site.
@linogaliana
Copy link
Contributor

Merci @TanguyBarthelemy, ça a l'air parfait. Tu peux faire une PR?

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

No branches or pull requests

2 participants