User:Phineas

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

Sup

function getTimestamp()
	local RTime = getRealTime()
	local year, month, day, hours, mins, secs = RTime.year + 1900, RTime.month + 1, RTime.monthday, RTime.hour, RTime.minute, RTime.second
	if (month < 10) then
		month = "0" ..tostring(month)
	end
	if (hours < 10) then
		hours = "0" ..tostring(hours)
	end
	if (mins < 10) then
		mins = "0" ..tostring(mins)
	end
	if (secs < 10) then
		secs = "0" ..tostring(secs)
	end
	local TimeStamp = day .. "-" .. month .. "-" .. year .. " " .. hours .. ":" .. mins .. ":" .. secs
	return TimeStamp
end