public String convert(Object o) {
        StringBuilder buf = new StringBuilder();
        Converter<Object> p = headTokenConverter;
        while (p != null) {
            buf.append(p.convert(o));
            p = p.getNext();
        }
        return buf.toString();
    }
@Test
    public void dateWithTimeZone() {
        TimeZone utc = TimeZone.getTimeZone("UTC");
        Calendar cal = Calendar.getInstance(utc);
        cal.set(2003, 4, 20, 10, 55);

        FileNamePattern fnp = new FileNamePattern("foo%d{yyyy-MM-dd'T'HH:mm, Australia/Perth}", context);
        // Perth is 8 hours ahead of UTC
        assertEquals("foo2003-05-20T18:55", fnp.convert(cal.getTime()));
    }