Code example for FieldPosition

0
 
    public String desiredTimestampInDesiredTimeZone() {
    	NSTimestampFormatter formatter = new NSTimestampFormatter();
    	NSTimeZone tz = NSTimeZone.timeZoneWithName(timeZoneID, false);
    	formatter.setDefaultFormatTimeZone(tz);
    	StringBuffer buffer = formatter.format(_currentTimestamp, new StringBuffer(), new FieldPosition(0));
    	return buffer.toString();
    } 
}