[edit]
I'm going to leave my answer here as a matter of pointing out/teaching you the non-CodeIgnitor sanitized version of PHP's object/typing (+date function!) system, but I HIGHLY suggest using, and accepting, Russell Dias' answer.
Is your example 100% literal?
Is your line of code literally echo $today = date('20y-m-d H:m:s',"1397105576"); or is it something more like echo $today = date('20y-m-d H:m:s',"$date");?
If it's the latter, and the variable is being created by a class, then it may not be properly-typed.
You could probably use… I think an int would suffice here, I think you could do something like echo $today = date('20y-m-d H:m:s',(int)$date);, again, assuming that your line of code is not in-fact literal.
I'm not 100% sure that int would work, if it doesn't, (float) is the only other numeric type that possible could. Perhaps (string)?
See Type Juggling.
As an aside, why are you using 20y? Please change that to a Y
From PHP's Date Docs:
Y | A full numeric representation of a year, 4 digits | Examples: 1999 or 2003
y | A two digit representation of a year | Examples: 99 or 03
intvalis converting the string to anint, not along; you could just use1397105576instead of the circuitousintval("1397105576"), but it shouldn't matter either way -- PHP will deal with the argument being a string. If this really did somehow solve your problem, you can post a separate answer or accept this one which appears to be the same solution - Michael Mrozek