I have a nanosecond integer need to be formated as Time object in ruby. How can i get Time object from nanosecond in ruby ?
I tried
Time.strptime '2318482693000', '%N'
but the time returned is current time not the exact time given (in nanoseconds)
You'd better consider use Time#at. But you have to adjust your nano elapse a little bit.