It will work if you give it the correct parameters. $asctime(...) is not valid. It expects you to provide a ctime value (the number of seconds since epoch), and perhaps a time formatting string.