FHEM Forum

FHEM => Automatisierung => Thema gestartet von: stephan.ritscher am 12 Januar 2020, 20:43:25

Titel: [patch] for datetime pattern in valueFn with DbLog
Beitrag von: stephan.ritscher am 12 Januar 2020, 20:43:25
Fix pattern for timestamps in month October which are set by valueFn of DbLog device.
Titel: Antw:[patch] for datetime pattern in valueFn with DbLog
Beitrag von: DS_Starter am 12 Januar 2020, 22:20:17
Hi,

I'm a litttle bit confused about your version. The last version is:

FVERSION   93_DbLog.pm:v4.9.6-s20883/2020-01-04

and the mentioned code doesn't exist. The valueFn is currently designed as:


....
                      my ($yyyy, $mm, $dd, $hh, $min, $sec) = ($TIMESTAMP =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/);
                      eval { my $epoch_seconds_begin = timelocal($sec, $min, $hh, $dd, $mm-1, $yyyy-1900); };
                      if (!$@) {
                          $timestamp = $TIMESTAMP;
                      } else {
.....
Titel: Antw:[patch] for datetime pattern in valueFn with DbLog
Beitrag von: DS_Starter am 13 Januar 2020, 07:29:07
Uuups, inddeed there is an old code snippet in lines 4624. I will change it to the current standard code.

best regards
Heiko
Titel: Antw:[patch] for datetime pattern in valueFn with DbLog
Beitrag von: DS_Starter am 13 Januar 2020, 22:16:58
I have changed the code to DbLog standard and checked in the module just now.

regards,
Heiko