How can I display timeleft for a specific PDStorage ?
We use a PDStorage with a 5 day timeout, but it dont clear !
Another question :
Imagine a timeline, and a PDStorage with 5 mins timeout, This PDStorage is a Tab dim.
At t0 : I visit a webpage who fill the PDStorage with URLNAME, and a value (exemple : www.exemple.com=1)
At X : I visit a second webpage, and add a new line into my PDStorage Tab (exemple : www.exemple2.com=1)
Do you think the PDStorage timeleft will be 5 mins from X or from t0 ?
I have raised a case with development to investigate the behavior you are seeing.
Based on my testing the timeleft was from X. I would have expected the timeleft would be from t0.
To answer your original question though, there is no way (nativley) to detemine how much time is left for a specific entry in PDStorage.
You would most likley need to store the timestamp in epoch time (t0+5 minutes), and and subtract the current time (X) to give you how much time is left.
If t0-X is less than 0, then that means the value should be expired.
Good response !
I use a PDStorage to display timeleft with a little calcul.