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

Export > Custom tabular exporter: date formatting doesn't work #3368

Open
allanaaa opened this issue Nov 27, 2020 · 6 comments
Open

Export > Custom tabular exporter: date formatting doesn't work #3368

allanaaa opened this issue Nov 27, 2020 · 6 comments
Labels
export Exporting a project to some format. Use the format-specific sub-label if available Type: Bug Issues related to software defects or unexpected behavior, which require resolution.

Comments

@allanaaa
Copy link
Contributor

Using the custom tabular exporter to export dates into locale formats (short, medium, long, full) doesn't seem to have any effect in any of the available output formats.

custom

To Reproduce

Export some columns of identical dates into the five available locale formats.

Current Results

HTML tables, XLS, XLSX, CSV, and TSV all output the original data into each cell, no matter which locale format you've chosen. Omitting time does nothing. The "use local time zone" checkbox does nothing.

Short,Medium,Long,Full,ISO
2020-09-16T13:15:31Z,2020-09-16T13:15:31Z,2020-09-16T13:15:31Z,2020-09-16T13:15:31Z,2020-09-16T13:15:31Z
2020-09-15T13:15:00Z,2020-09-15T13:15:00Z,2020-09-15T13:15:00Z,2020-09-15T13:15:00Z,2020-09-15T13:15:00Z

Expected Behavior

Presumably (like some of the other settings for the custom tabular exporter) this is intended to work in at least one of the available output formats, but maybe not all of them. Can anyone tell me which formats?

There seem to be other discussions (#3322 for example) around this right now so I just want to register this as something to test when those are worked on.

@allanaaa allanaaa added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Nov 27, 2020
@rachittiwari8562
Copy link
Contributor

I have looked into this issue,and there seems to have some problem in backened.
As far as i have researched the parameters are correcty passed in the backened upto the file main/src/com/google/refine/exporters/CustomizableTabularExporterUtilities.java
But in the function "void setup()" the "date" variable (which ideally should have user selected values for different options) has default values and hence it gives identical results.

@rachittiwari8562
Copy link
Contributor

rachittiwari8562 commented Dec 1, 2020

Also i am having a hunch that something is wrong in the else case in the line from 117 to 136 .Specifically in the line 129.

@wetneb wetneb added export Exporting a project to some format. Use the format-specific sub-label if available and removed Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Dec 3, 2020
@allanaaa
Copy link
Contributor Author

allanaaa commented Dec 3, 2020

This issue is being noted in the 3.4.1 documentation here: https://deploy-preview-3336--openrefine-docs.netlify.app/manual/exporting/#custom-tabular-exporter
(soon to be at https://docs.openrefine.org/manual/exporting#custom-tabular-exporter )

In the future, when a PR to fix this has been completed, the documentation should be updated to reflect the functions.

@wetneb
Copy link
Sponsor Member

wetneb commented Dec 3, 2020

We also noted that at the moment the option to ignore the time is not honoured.

@tfmorris
Copy link
Member

tfmorris commented Dec 3, 2020

Can anyone tell me which formats?

XLS, XLSX, & ODS probably won't support localized dates. The rest of the listed formats probably should, although we might want to make ISO 8601 the default for CSV/TSV to encourage people to not make life more difficult for themselves.

@xbdeng
Copy link

xbdeng commented Apr 20, 2022

I want to try to solve this issue, and I have done something. Could you assign this issue to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export Exporting a project to some format. Use the format-specific sub-label if available Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants