mkz-programm: support one more of many date formats
This commit is contained in:
parent
3968894bd7
commit
55a5cce341
|
@ -40,6 +40,9 @@ while url
|
||||||
elsif date =~ /(\d+)\.(\d+)\.(\d+)\s*-\s*(\d+)\.(\d+)\.(\d+)/
|
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.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
|
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
|
else
|
||||||
puts "Unrecognized date: #{date}"
|
puts "Unrecognized date: #{date}"
|
||||||
next
|
next
|
||||||
|
|
Loading…
Reference in New Issue