Add new script API function: getdate(timestamp)