Fix Converting octet date to text. Fix some syntax.

Bug perl 5.20.0 and below version on POSIX module.
Convert to perl internal text if octet $date.