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

Corregir error de pérdida de un día en las fechas en equipos que se encuentren al oeste de la zona horaria UTC #4

Merged
merged 2 commits into from Nov 5, 2022

Conversation

renemoreno
Copy link
Contributor

Se agregó la opción de siempre poner la fecha en zona horaria UTC para evitar que la fecha en equipos ubicado al oeste del meridiano cero quiten 1 día.

Para esto solo se agregó en las constantes dateFormat la opción timeZone: 'UTC',

Ver https://dev.to/zachgoll/a-complete-guide-to-javascript-dates-and-why-your-date-is-off-by-1-day-fi1
Ver https://codefordev.com/discuss/6361936491/tolocaledatestring-is-subtracting-a-day

Se agregó al dateFormat la opción de timeZone: 'UTC' para que la fecha aparezca bien en cualquier equipo que se encuentre en una zona horaria al oeste de UTC
Se agregó a dateFormat timezone: 'UTC', para que equipos que se encuentren al oeste de la zona horaria UTC no quiten un día a la fecha
@JaimeObregon JaimeObregon merged commit aa87dd6 into JaimeObregon:main Nov 5, 2022
@JaimeObregon
Copy link
Owner

Thank you very much, @renemoreno! I have merged your valuable fix, and extended it to the rest of calls to toLocaleDateString() in the source. 🎉

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.

None yet

2 participants