my $date = $day | ($month<<5) | ($year<<9); my $time = $second | ($min<<5) | ($hour<<11); my $fat32 = sprintf "0x%08x", $time | ($date<<16);