How can I adjust date extracted from JSON as unixtime?

Hello there,

There is this fund (LU1317710371) I couldn’t find any source of for historical values.
The only resource I managed to discover is the assumed asset manager website.
Here, login is not mandatory, but a disclaimer page prevent automatic crawling, and the browser UserAgent value is tested (you’ll get an error 403 if set empty).
So with Firefox I could manually get data on https://www.ofi-am.fr/produit/ofi-invest-rs-ethical-european-equity-part-ofi-actions-europe-eur/LU1317710371
But if I submit this URL to PP, in the historical value for Table analysis, the server response is error 404 !!! :crazy_face:

If could manually download a CSV for historical values since 19/01/2016 and after proper settings could feed PP with it.
Here is a sample:

Date,VL,Devise
14/02/2022,78.75,EUR
11/02/2022,80.18,EUR
10/02/2022,80.8,EUR
09/02/2022,81.13,EUR
...
21/01/2016,49.25,EUR
20/01/2016,48.46,EUR
19/01/2016,50,EUR

Job done! But what about next updates ?
Looking at the source code of the page I fund the URL of an up-to-date JSON table embedded in an html shell of the full history (55kBytes).

Here is a sample:

[
  {"date":1453158000000,"value":50},
  {"date":1453244400000,"value":48.46},
  {"date":1453330800000,"value":49.25},
  {"date":1453417200000,"value":50.54},
  ....
  {"date":1644534000000,"value":80.18},
  {"date":1644793200000,"value":78.75}
]

Then I edited the PP item to retrieve historical values from this JSON, with following settings:

JSON-DATE = $.[*].date
JSON-CLOSE = $.[*].value

It works… But there is a glitch!
As dates are encoded using unixtime at time 00:00.000ms and, maybe due to timezone ambiguity (UTC vs Paris/Berlin) , Monday at 00:00.000 is converted to Sunday !
Obviously the unixtime is GMT+1 in the JSON, but PP think it’s UTC then all dates appear at D-1.

Regarding the last value in the table, “1644793200000” should be converted by PP to “Mon Feb 14 2022 00:00:00 GMT+0100” like with the CSV and not to “Sun Feb 13 2022 23:00:00 GMT+0000”

So finally my question is … the title of this post.
What can I do to automatically adjust at D+1 the result stored by PP in the xml.

Or maybe you know another source that work with this exotic fund to workaround this issue.

I am not completely sure, but does PP not depend on your local TZ? Which should therefore be europe/london

Hello @ProgFriese thanks for reply :wink:

No complication here, I’m French… PP, the asset manager and me are sharing the same TZ, that is GMT+1. It just a shame that the provider didn’t use UTC for encoding the date time stamps.

Knowing the programming language of PP I wonder if we can ever apply a transformation to the JSONpath settings for Code and Date. Maybe an “additional attribute” for setting the TZ would help.

Hi, please would it be possible to specify timezone on JSON qoute feed configuration if it’s different from UTC in feed data ?