2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

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 b187d29e3e
commit 92ccacb475

View File

@ -2797,6 +2797,17 @@ FmtTime($)
return sprintf("%02d:%02d:%02d", $t[2], $t[1], $t[0]); 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 sub
ResolveDateWildcards($@) ResolveDateWildcards($@)