mkz-programm: support one more of many date formats

This commit is contained in:
Astro 2023-01-12 19:51:21 +01:00
parent 3968894bd7
commit 55a5cce341
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ while url
elsif date =~ /(\d+)\.(\d+)\.(\d+)\s*-\s*(\d+)\.(\d+)\.(\d+)/
ev.start = Time::local $3.to_i, $2.to_i, $1.to_i, 0, 0, 0
ev.end = Time::local $6.to_i, $5.to_i, $4.to_i, 23, 59, 59
elsif date =~ /(\d+)\.(\d+)\.(\d+),\s*(\d+):(\d+)/
ev.start = Time::local $3.to_i, $2.to_i, $1.to_i, $4.to_i, $5.to_i, 0
ev.end = ev.start + 7200
else
puts "Unrecognized date: #{date}"
next