in reply to day of year

Sure. $yday is in the range 0..364 or 365

If you want "zulu time" you could use gmtime instead of localtime, maybe?.