You can translate the question and the replies:

OData2 Wrapper converting DateTime to "Local" DateTime?

I have been using a JSON data source and switched to a custom wrapper for Odata3 (using OData2 custom wrapper with headers 'Content-type="application/json";Accept="application/json";DataServiceVersion="2.0";MinDataServiceVersion="2.0";MaxDataServiceVersion="2.0" ) When the Odata is returned in the Json format (via web browser or JSON data source) I get the datetime "2017-06-19T12:00" but with the OData2 custom wrapper I get the datetime "2017-06-19T05:00". The server is in PST (-7) Outpuschema code for OData2 Wrapper: "IncidentDate" = 'IncidentDate' : 'java.time.LocalDateTime' (OPT) (sourcetypeid='93') NOT NULL SORTABLE Outputschema code for JSON data source: "IncidentDate" = 'JSONFile.value.IncidentDate' : 'java.lang.String' I tried converting the OData2 wrapper outputschema to: "IncidentDate" = 'IncidentDate' :'java.lang.String' (OPT) (sourcetypeid='12') But I still get "Jun 19, 2017 5:00:00 AM". How can I get the "original" datetime? (without converting AFTER loading) What's going on here? Thanks!
user
28-06-2019 13:11:52 -0400

1 Answer

Hi, Starting from Denodo 7.0, new types are available to represent the DateTime values. The OData wrapper displays the results based on the system’s timezone. In order to get DateTime value as displayed when accessed through a web browser or JSON data source using OData2 custom wrapper, I would perform the following steps: * Click on the Options tab in the base view. * Go to the Search Methods tab and select [i18n](https://community.denodo.com/kb/view/document/Internationalization%20configuration%20and%20dates?category=Common+Errors) based on source timezone. The i18n configuration is used to change the default timezone into the desired time zone of your choice. * After that execute the base view to get expected results. For more information, have a look at the following section [Managing Internationalization Configurations](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/advanced_characteristics/creating_new_internationalization_configurations/creating_new_internationalization_configurations#managing-internationalization-configurations) of the Virtual DataPort VQL Guide. Hope This Helps!
Denodo Team
01-07-2019 09:00:51 -0400
You must sign in to add an answer. If you do not have an account, you can register here