Always specify the date format in TO_DATE calls.
begin var := to_date('2015-01-01'); end;
begin var := to_date('2015-01-01', 'YYYY-MM-DD'); end;