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

Data / Perspective doesn't format local dates #3812

Open
Crashillo opened this issue Apr 8, 2021 · 1 comment
Open

Data / Perspective doesn't format local dates #3812

Crashillo opened this issue Apr 8, 2021 · 1 comment
Assignees

Comments

@Crashillo
Copy link
Contributor

Crashillo commented Apr 8, 2021

It displays american-style format instead:

https://getafe.gobify.net/datos/habitantes-nacionalidad-nivel-instruccion/editor?sql=SELECT%2520%2a%2520FROM%2520habitantes_por_nacionalidad_nivel_instruccion%250Awhere%2520fecha%2520%253D%2520%271%252F4%252F2021%27

UPDATE

After a further research, we couldn't find a way to cast properly the locale-sensitive fields. These are date and decimal, mainly.

When perspective receives a csv-string as data input, it parses the fields by some built-in lib. It doesn't matter you explicitly set the datatypes, it does it anyways. As a result, dates and numeric values are shown in American format.

Another try was to send a javascript object, instead of a csv-string. That requires preparsed the datatypes, but even so, perspective casts the types again, resulting American format. The only way to bypass this is about converting (in the preparsed step) these fields to strings.

@Crashillo Crashillo self-assigned this Apr 8, 2021
@Crashillo Crashillo mentioned this issue Apr 9, 2021
3 tasks
@Crashillo
Copy link
Contributor Author

Regarding this: finos/perspective#962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant