fhem.pl: Add FmtDateTimeRFC1123 (Forum #41125)

git-svn-id: https://svn.fhem.de/fhem/trunk@9307 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-09-25 18:44:20 +00:00
parent 1e12cc0ef4
commit 2109e77e19

View File

@@ -2797,6 +2797,17 @@ FmtTime($)
return sprintf("%02d:%02d:%02d", $t[2], $t[1], $t[0]);
}
sub
FmtDateTimeRFC1123($)
{
my $t = gmtime(shift);
if($t =~ m/^(...) (...) (..) (..:..:..) (....)$/) {
return sprintf("$1, %02d $2 $5 $4 GMT", $3);
}
return $t;
}
#####################################
sub
ResolveDateWildcards($@)