[plt-scheme] convert seconds to date, time?

From: Paul Graham (pg at ycombinator.com)
Date: Thu Sep 14 12:59:54 EDT 2006

Is there a way in mzscheme to convert a (current-seconds) time
to a GMT date and time?

I know this functionality must be buried in there somewhere, 
because there is a function seconds->date that does this and 
more (adjusting for the timezone your computer thinks it's
in).  I just wonder if there is a way to get access to the
underlying functionality for converting seconds to dates.

If not this would be a useful thing to expose.  My own app
is generating log files, and starts a new one each day.
I'd rather do this based on days GMT, so that it doesn't break
if someone happens to tell the computer it's in a new timezone.

Also, if you had this, you could do date arithmetic: you 
could easily calculate e.g. what the date will be 1000 days
from now.

--pg


Posted on the users mailing list.