On Wed, Mar 17, 2010 at 11:18 PM, Andreas J. Koenig <andreas.koenig.7os6v...@franz.ak.mind.de> wrote: > > Ick. POSIX. That's heavy. Thinking about it, in UTC it should be > > easy. I suspect this will do: > > > my ($year,$month,$day,$hour,$min,$sec) = (gmtime)[5,4,3,2,1,0]; > > print sprintf("%4d-%02d-%02dT%02d:%02d:%02dZ", > > 1900+$year,1+$month,$day,$hour,$min,$sec); > > > Anyone see any issues with that? > > No, this is fine and is actually what I used for ages but I translated > "lightweight" differently than you:)
Heh. Right now, I'll trade no modules for a bad perl golf score. David