function TS.GetFormattedTimeDate()

	local year = os.date ( "%y" );
	local month = os.date( "%m" );
	local day = os.date( "%d" );
	local hour = os.date( "%H" );
	local min = os.date( "%M" );
	
	year = math.floor( year );
	month = math.floor( month );
	day = math.floor( day );
	hour = math.floor( hour );
	min = math.floor( min );

	return year, month, day, hour, min;

end

-- sharpy - TODO: find average months to make banning more accurate
function TS.GetTimeDate()

	local year = os.date ( "%y" );
	local month = os.date( "%m" );
	local day = os.date( "%d" );
	local hour = os.date( "%H" );
	local min = os.date( "%M" );

	return year, month, day, hour, min;

end

function BeginStorm()

	storm_active = true
	
	SetGlobalString("weather","dark")
	
	timer.Simple( 8, function()
		if( storm_active ) then
			for k, v in pairs( player.GetAll() ) do
				v:ConCommand("play " .. Format("ambient/atmosphere/thunder%i.wav",math.random(1,4)) )
			end
		end
	end );
	
	timer.Simple( 10, function()
		if( storm_active ) then
			SetGlobalString("weather","storm")
		end
	end );
	
	timer.Simple( 480, function()
		if( storm_active ) then
			SetGlobalString("weather","dark")
		end
	end );
	
	timer.Simple( 490, function()
		if( storm_active ) then
			SetGlobalString("weather","sunny")
		end
	end );
	
	timer.Simple( 510, function()
		storm_active = false
	end );

end
