Look here when Chapter 8 of the book mentions something extra to be found on the web site.
Decode Cookies:
Here is the code for
decooding cookies. Note that this file is also supplied for download with the source code archives.
Date function:
Here is the
one_year_from_now function which is used in the
preferences.cgi program shown in Figure 8.5. It simply generates a cookie-formatted time one year from when the function is called. Note that this file is also supplied for download with the source code archives.