from UNIX time by 鳴神裁4.1号

{s=$1%60
m=int($1/=60)%60
h=int($1/=60)%24
for(j=1970;j<2039;j++)days_on_Jan1st_from_epoch[j+1]=days_on_Jan1st_from_epoch[j]+365+!(j%4)
for(Y=int((days_from_epoch=int($1/24))/365.2425)+1971;days_from_epoch<days_on_Jan1st_from_epoch[Y];Y--);
for(i=12;i;i--)days_of_month[i]=i-2?i<8?30+i%2:31-i%2:28+!(Y%4)
D=days_from_epoch-days_on_Jan1st_from_epoch[Y]+1
for(M=1;D>days_of_month[M];D-=days_of_month[M++]);
printf"%d/%02d/%02d %02d:%02d:%02d\n",Y,M,D,h,m,s}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page