milliseconds from unix timestamp

Hi guys,

I have a unix timestamp and I want it to convert it to the following format YYYY-MM-DDTHH:MM:SS.MMMZ

I tried using os.date

local date = os.date("\*t",unix\_timestamp )   
local formatedDate = date.year.."-"..date.month.."-"..date.day.."T"..date.hour.."-"..date.min.."-"..date.sec..".".."000".."Z"   

as you can see, I am still missing the milliseconds. what’s the best way to get them?

thanks [import]uid: 74667 topic_id: 27849 reply_id: 327849[/import]