Below is a little perl script that will do it on a *nix box (or an OS that has the gmtime function). It isn't perfect since it doesn't account for the leap seconds (so around 6 seconds off). Running your example I get:
where 20120904 is YYYYMMDD format. Time is in UTC. Substitute localtime for gmtime below to get in the machine's local time zone.
#!/usr/bin/perl
$JAN6_1980 = 315964800; #Seconds between Jan 1, 1970 (POSIX time zero) and Jan 6, 1980 (GPS time zero
)
$GPS_OFFSET = 1e9;
while(<>)
{
$gps = $_;
if($gps >= 0 && $gps < 7*86400){ # could be seconds of the week
print "Value $gps may be seconds of the week\n";
}
$gps += $JAN6_1980 + $GPS_OFFSET;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($gps);
printf("%f => %04d%02d%02d %02d:%02d:%02d\n",$gps,$year+1900,$mon+1,$mday,$hour,$min,$sec);
}