-module(r). -export([m/0]). m()->case io:fread('',"~d")of{_,[X]}->{{Y,M,D},{H,L,S}}=calendar:now_to_datetime({0,X-length([1||Y<-" \n $",X div 31556926>=Y]),0}),io:format("~p-~2..0B-~2..0b ~.2.0w:~.2.0w:~.2.0w\n",[Y,M,D,H,L,S]),m();_->0end.