dateString += rightNow.get(Calendar.HOUR_OF_DAY) + ":" + rightNow.get(Calendar.MINUTE) + ":" + rightNow.get(Calendar.SECOND); dateString += " ";
String tHour = Integer.toString(rightNow.get(Calendar.HOUR_OF_DAY)); if(tHour.length() == 1) { tHour = "0" + tHour; } String tMinute = Integer.toString(rightNow.get(Calendar.MINUTE)); if(tMinute.length() == 1) { tMinute = "0" + tMinute; } String tSecond = Integer.toString(rightNow.get(Calendar.SECOND)); if(tSecond.length() == 1) { tSecond = "0" + tSecond; }  dateString += tHour + ":" + tMinute + ":" + tSecond + " ";
	private String getDateRFC822()	{		String dateString = new String();		Calendar rightNow = Calendar.getInstance();				//Day of the week		switch(rightNow.get(Calendar.DAY_OF_WEEK))		{			case Calendar.MONDAY:			{				dateString = "Mon";				break;			}			case Calendar.TUESDAY:			{				dateString = "Tue";				break;			}			case Calendar.WEDNESDAY:			{				dateString = "Wed";				break;			}			case Calendar.THURSDAY:			{				dateString = "Thu";				break;			}			case Calendar.FRIDAY:			{				dateString = "Fri";				break;			}			case Calendar.SATURDAY:			{				dateString = "Sat";				break;			}			case Calendar.SUNDAY:			{				dateString = "Sun";				break;			}		}		dateString += ", ";				//Date 		dateString += rightNow.get(Calendar.DAY_OF_MONTH);		dateString += " ";				//Month		switch(rightNow.get(Calendar.MONTH))		{			case Calendar.JANUARY:			{				dateString += "Jan";				break;			}			case Calendar.FEBRUARY:			{				dateString += "Feb";				break;			}			case Calendar.MARCH:			{				dateString += "Mar";				break;			}			case Calendar.APRIL:			{				dateString += "Apr";				break;			}			case Calendar.MAY:			{				dateString += "May";				break;			}			case Calendar.JUNE:			{				dateString += "Jun";				break;			}			case Calendar.JULY:			{				dateString += "Jul";				break;			}			case Calendar.AUGUST:			{				dateString += "Aug";				break;			}			case Calendar.SEPTEMBER:			{				dateString += "Sep";				break;			}			case Calendar.OCTOBER:			{				dateString += "Oct";				break;			}			case Calendar.NOVEMBER:			{				dateString += "Nov";				break;			}			case Calendar.DECEMBER:			{				dateString += "Dec";				break;			}		}		dateString += " ";				//Year		dateString += rightNow.get(Calendar.YEAR);		dateString += " ";				//Time		dateString += rightNow.get(Calendar.HOUR_OF_DAY) + ":" + rightNow.get(Calendar.MINUTE) + ":" + rightNow.get(Calendar.SECOND);		dateString += " ";				//TimeZone Correction		String tzSign = new String();		String tzHours = new String();		String tzMinutes = new String();				TimeZone thisTZ = TimeZone.getDefault();		int TZOffset = thisTZ.getOffset(rightNow.get(Calendar.DATE)); //get timezone offset in milliseconds	    TZOffset = (TZOffset / 1000); //convert to seconds	    TZOffset = (TZOffset / 60); //convert to minutes	    	    //Sign	    if(TZOffset > 1)	    {	    	tzSign = "+";	    }	    else	    {	    	tzSign = "-";	    }	    	    //Calc Hours and Minutes?	    if(TZOffset >= 60 || TZOffset <= -60)	    {	    	//Minutes and Hours	    	tzHours += (TZOffset / 60); //hours	    	if(tzHours.length() == 1)  // do we need to prepend a 0	    	{	    		tzHours = "0" + tzHours;	    	}	    		    	tzMinutes += (TZOffset % 60); //minutes	    	if(tzMinutes.length() == 1)  // do we need to prepend a 0	    	{	    		tzMinutes = "0" + tzMinutes;	    	}	    }	    else	    {	    	//Just Minutes	    	tzHours = "00";	    	tzMinutes += TZOffset;	    	if(tzMinutes.length() == 1)  // do we need to prepend a 0	    	{	    		tzMinutes = "0" + tzMinutes;	    	}	    }	    		dateString += tzSign + tzHours + tzMinutes;				return(dateString);	}