mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
93_DbLog: change datetime pattern in valueFn of addCacheLine Forum: #107285
git-svn-id: https://svn.fhem.de/fhem/trunk@20966 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
22a885b3ae
commit
65c11b0ab2
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- change: 93_DbLog: change datetime pattern in valueFn of addCacheLine
|
||||||
|
Forum: #107285
|
||||||
- change: 98_todoist: reorder tasks - widget reorder
|
- change: 98_todoist: reorder tasks - widget reorder
|
||||||
- change: 73_NUKIBridge: 74_NUKIDevice use packages
|
- change: 73_NUKIBridge: 74_NUKIDevice use packages
|
||||||
- change: 98_Heating_Control: move to contrib
|
- change: 98_Heating_Control: move to contrib
|
||||||
|
@ -30,6 +30,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|||||||
|
|
||||||
# Version History intern by DS_Starter:
|
# Version History intern by DS_Starter:
|
||||||
our %DbLog_vNotesIntern = (
|
our %DbLog_vNotesIntern = (
|
||||||
|
"4.9.7" => "13.01.2020 change datetime pattern in valueFn of DbLog_addCacheLine. Forum: #107285 ",
|
||||||
"4.9.6" => "04.01.2020 fix change off 4.9.4 in default splitting. Forum: #106992 ",
|
"4.9.6" => "04.01.2020 fix change off 4.9.4 in default splitting. Forum: #106992 ",
|
||||||
"4.9.5" => "01.01.2020 do not reopen database connection if device is disabled (fix) ",
|
"4.9.5" => "01.01.2020 do not reopen database connection if device is disabled (fix) ",
|
||||||
"4.9.4" => "29.12.2019 correct behavior if value is empty and attribute addStateEvent is set (default), Forum: #106769 ",
|
"4.9.4" => "29.12.2019 correct behavior if value is empty and attribute addStateEvent is set (default), Forum: #106769 ",
|
||||||
@ -4620,8 +4621,15 @@ sub DbLog_addCacheLine($$$$$$$$) {
|
|||||||
Log3 $hash->{NAME}, 4, "DbLog $name -> Event ignored by valueFn - TS: $i_timestamp, Device: $i_dev, Type: $i_type, Event: $i_evt, Reading: $i_reading, Value: $i_val, Unit: $i_unit";
|
Log3 $hash->{NAME}, 4, "DbLog $name -> Event ignored by valueFn - TS: $i_timestamp, Device: $i_dev, Type: $i_type, Event: $i_evt, Reading: $i_reading, Value: $i_val, Unit: $i_unit";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$i_timestamp = $TIMESTAMP if($TIMESTAMP =~ /(19[0-9][0-9]|2[0-9][0-9][0-9])-(0[1-9]|1[1-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1]) (0[0-9]|1[1-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/);
|
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 (!$@) {
|
||||||
|
$i_timestamp = $TIMESTAMP;
|
||||||
|
} else {
|
||||||
|
Log3 ($name, 2, "DbLog $name -> Parameter TIMESTAMP got from valueFn is invalid: $TIMESTAMP");
|
||||||
|
}
|
||||||
|
|
||||||
$i_dev = $DEVICE if($DEVICE ne '');
|
$i_dev = $DEVICE if($DEVICE ne '');
|
||||||
$i_type = $DEVICETYPE if($DEVICETYPE ne '');
|
$i_type = $DEVICETYPE if($DEVICETYPE ne '');
|
||||||
$i_reading = $READING if($READING ne '');
|
$i_reading = $READING if($READING ne '');
|
||||||
|
Loading…
Reference in New Issue
Block a user