Hi:
For grins-and-giggles, we can shorten things:
# perl -e '@t=localtime;printf "%03x%02x%02x%02x%02x%02x\n",$t[5]+1900,$t[4]+1,@t[3,2,1,0]'
For that matter, you can convert any Epoch seconds to a hexadecimal number representing the date components. For me, in the Eastern US, 999,999,999 seconds after the Epoch yielded 0x7d10908152e27 or 20010908214639 (2001-09-08-21:46:39).
# perl -e '@t=localtime(999_999_999);printf "%03x%02x%02x%02x%02x%02x\n",$t[5]+1900,$t[4]+1,@t[3,2,1,0]'
Regards!
...JRF...