Page 1 of 1

date in the data persistent

Posted: Tuesday 07 January 2025 20:43
by pierrotori
Hi
when i use the command dz.data.stat_xxxx.add and i check the date in the data persistent file, i have this
["xxxx"] = {
[1] = {
["time"] = "2025-1-7 19:30:0.343";
["data"] = "blabla";
};
the problem is the time must be 20:30 and not 19:30
my rpi and container docker are at the right time
Could you check your time in data persistent file?
Pierrotori

Re: date in the data persistent

Posted: Tuesday 07 January 2025 21:49
by waltervl
Why is it a problem?
It probably is UTC time that is stored in the file as that is common practice.

Re: date in the data persistent

Posted: Thursday 12 June 2025 21:18
by pierrotori
i have a delta of 2 hours with the new version
["mesure"] = {
[1] = {
["time"] = "2025-6-12 19:15:2.427";
["data"] = 1;
};
in the docker-compose i put TZ=Europe/Paris and the date in the container is up
and the date in the container
root@af0c9761cdcc:/opt/domoticz# date
Thu Jun 12 21:15:09 CEST 2025

i would like to have the same date in the data persistent and the date system

Re: date in the data persistent

Posted: Thursday 12 June 2025 22:31
by waltervl
Then you probably have to write a persistent file yourself.

Why do you want the exact correct time in that file? As it is possibly not designed to have the exact time in that file but the UTC time. The time in that file is only needed to calculate time differences to manage the size of data fields