If the input is a string but Time.parse can't parse it, maybe it's a UNIX timestamp.
Fixes #2339
This commit is contained in:
parent
a6af5e26bc
commit
348bcae763
|
@ -230,7 +230,9 @@ module Jekyll
|
|||
when Time
|
||||
input
|
||||
when String
|
||||
Time.parse(input)
|
||||
Time.parse(input) rescue Time.at(input.to_i)
|
||||
when Number
|
||||
Time.at(input)
|
||||
else
|
||||
Jekyll.logger.error "Invalid Date:", "'#{input}' is not a valid datetime."
|
||||
exit(1)
|
||||
|
|
Loading…
Reference in New Issue