I understand what you are saying and I think you are right. Thanks Ulli.
If it doesn't bother you and Eric, can you confirm that it returns the instruction from my initial query?
In theory, this should be a correct solution for my purpose of subtracting a day from a date.
But my problem is that in practice (and I have tested it on ESP8266 and ESP32, with Annex 1.43.3), it returns the date minus two days, not just one.
However, it works for Cicciocb.
That's why I asked more people, from different countries, to run the code and tell me the result.
I try to find out what my mistake is
there's probably something wrong with 'dateunix' in connection with a timezone setting.
Maybe the intermediate variable precision is insufficient, cutting away a few hours and sliding into the previous day. Hopefully ciccio can say more to this.
I checked 'unixdate$', it works correctly.
With no timezone defined it seems to work correctly, strange.
Cheers
Ulli
The light at the end of the tunnel has been switched off for energy saving reasons.
Ulli, you got it right.
If I leave the "Time Zone" box blank and reset the system, unixDate$((dateUnix(date$) - 86400)) correctly calculates the previous day.
However, as is logical, now the instruction time$ returns a value 2 hours less than that of my time zone.
snake eating its own!
But I appreciate it, because we have already found out the cause. It was driving me crazy.