2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 14:46:24 +00:00

99_Utils.pm: change time_str2num split regexp (Forum #31652)

git-svn-id: https://svn.fhem.de/fhem/trunk@7461 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-01-06 16:32:08 +00:00
parent 6e88577810
commit 23202c6537

View File

@ -70,7 +70,7 @@ time_str2num($)
my ($str) = @_; my ($str) = @_;
my @a; my @a;
if($str) { if($str) {
@a = split("[- :]", $str); @a = split("[T: -]", $str);
return mktime($a[5],$a[4],$a[3],$a[2],$a[1]-1,$a[0]-1900,0,0,-1); return mktime($a[5],$a[4],$a[3],$a[2],$a[1]-1,$a[0]-1900,0,0,-1);
} else { } else {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);