Commit 3b351275 authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 556439: Prevent datetime_from from dying if it gets 0000-00-00 as a

date from the database r=LpSolit, a=LpSolit
parent a9a869f8
......@@ -438,6 +438,9 @@ sub format_time {
sub datetime_from {
my ($date, $timezone) = @_;
# In the database, this is the "0" date.
return undef if $date =~ /^0000/;
# strptime($date) returns an empty array if $date has an invalid
# date format.
my @time = strptime($date);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment