Then I would suggest phrasing the problem as "turn the access¹ time of a file into an STMP date string", and adjusting the solution accordingly. I think a cookbook is much more useful when it shows how to solve actual problems rather than how to handle individual technicalities.
¹ Actually, modification date would probably make more sense.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-06-02 00:50: Subject: Re: Pike Cookbook
the second was necessary because the actual situation was to fix the already existing function get_time(int t) which returned a datestring that was flagged by my spamfilter as being non-compliant.
apart from that, the usefullness would be that in unix time_t is used in a lot of places to store time values (say file access times and such) therefore i see a lot of situation where an existing time value != now needs to be evaluated.
/ Brevbäraren