mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
99_Utils.pm: time2str: do not warn if Z is spezified. (Forum #110545)
git-svn-id: https://svn.fhem.de/fhem/trunk@21767 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2cc881b4a3
commit
055f8889d1
@ -16,13 +16,9 @@ time_str2num($)
|
|||||||
{
|
{
|
||||||
my ($str) = @_;
|
my ($str) = @_;
|
||||||
my @a;
|
my @a;
|
||||||
if($str) {
|
return time() if(!$str);
|
||||||
@a = split("[T: -]", $str);
|
@a = split("[ZT: -]", $str); # 31652, 110545,
|
||||||
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 {
|
|
||||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
|
||||||
return mktime($sec, $min, $hour, $mday, $mon, $year, 0, 0, -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user