Code example for TimeZone

Methods: getIDgetRawOffset

0
	/** 
	 * The raw offset covert to a nice string. Eg: + 05:00  
	 * @return 
	 */ 
	public String getRawOffsetDisplay() {
		int offset = this.timeZone.getRawOffset();
		return String.format(OFFSET_FORMAT, offset >= 0 ? "+" : "-", Math.abs(offset / _3600000), Math.abs((offset / _60000) % _60));		
	} 
 
	/** 
	 * The string that is searched in the add dialog box (using ID + display name + offset) - and lowercased 
	 * Replacing the underscore with space as well for better search. eg: its new_york as zone id 
	 * @return 
	 */ 
	public String getSearchString() {
		return new StringBuilder(this.timeZone.getID()).append(this.getDisplayName()).append(this.getRawOffsetDisplay()).toString().toLowerCase().replace("_", " ");
	} 
	 
	/** 
	 * Default display string 
	 * @return 
Experience pair programming with AI  Get Codota for Java