#!/usr/bin/perl

use strict;

use Time::Local;

my($unixtime) = shift(@ARGV);

$unixtime = hex($unixtime) if ($unixtime =~ /[a-f]/i);

my($unixtime0h) = 27111902;
my($unixtime0l) = 3577643008;

my($ftime) = $unixtime * 10000000 + $unixtime0h * 0x100000000 + $unixtime0l + (timegm(0,0,0,1,0,0)-timelocal(0,0,0,1,0,0))*10000000;
my($time_l) = $ftime % 0x100000000;
my($time_h) = ($ftime - $time_l) / 0x100000000;

printf("%08x.%08x\n", $time_h, $time_l);
