int timezone = d.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000);
int timezone = (d.get(Calendar.ZONE_OFFSET) + d.get(Calendar.DST_OFFSET)) / (60 * 60 * 1000);
    public PdfDate(Calendar d) {        super();        StringBuffer date = new StringBuffer("D:");        date.append(setLength(d.get(Calendar.YEAR), 4));        date.append(setLength(d.get(Calendar.MONTH) + 1, 2));        date.append(setLength(d.get(Calendar.DATE), 2));        date.append(setLength(d.get(Calendar.HOUR_OF_DAY), 2));        date.append(setLength(d.get(Calendar.MINUTE), 2));        date.append(setLength(d.get(Calendar.SECOND), 2));        int timezone = d.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000);        if (timezone == 0) {            date.append("Z");        }        else if (timezone < 0) {            date.append("-");            timezone = -timezone;        }        else {            date.append("+");        }        if (timezone != 0) {            date.append(setLength(timezone, 2)).append("'");            int zone = Math.abs(d.get(Calendar.ZONE_OFFSET) / (60 * 1000)) - (timezone * 60);            date.append(setLength(zone, 2)).append("'");        }        value = date.toString();    }