class IQEntityTimeHandler extends IQHandler implements ServerFeaturesProvider {

    private final IQHandlerInfo info;

    public IQEntityTimeHandler() {
        super("XEP-0202: Entity Time");
        info = new IQHandlerInfo("time", "urn:xmpp:time");
    }

    @Override
    public IQ handleIQ(IQ packet) {<FILL_FUNCTION_BODY>}

    @Override
    public IQHandlerInfo getInfo() {
        return info;
    }

    @Override
    public Iterator<String> getFeatures() {
        return Collections.singleton(info.getNamespace()).iterator();
    }

    /**
     * Formats a {@link TimeZone} as specified in XEP-0082: XMPP Date and Time Profiles.
     *
     * @param tz The time zone.
     * @return The formatted time zone.
     */
    String formatsTimeZone(TimeZone tz) {
        // package-private for test.
        int seconds = Math.abs(tz.getOffset(System.currentTimeMillis())) / 1000;
        int hours = seconds / 3600;
        int minutes = (seconds % 3600) / 60;
        return (tz.getRawOffset() < 0 ? "-" : "+") + String.format("%02d:%02d", hours, minutes);
    }

    /**
     * Gets the ISO 8601 formatted date (UTC) as specified in XEP-0082: XMPP Date and Time Profiles.
     *
     * @param date The date.
     * @return The UTC formatted date.
     */
    String getUtcDate(Date date) {
        // package-private for test.
        Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
        calendar.setTime(date);
        // This makes sure the date is formatted as the xs:dateTime type.
        return DatatypeConverter.printDateTime(calendar);
    }
}

        IQ response = IQ.createResultIQ(packet);
        Element timeElement = DocumentHelper.createElement(QName.get(info.getName(), info.getNamespace()));
        timeElement.addElement("tzo").setText(formatsTimeZone(TimeZone.getDefault()));
        timeElement.addElement("utc").setText(getUtcDate(new Date()));
        response.setChildElement(timeElement);
        return response;
    
<methods>public void <init>(java.lang.String) ,public abstract org.jivesoftware.openfire.IQHandlerInfo getInfo() ,public abstract IQ handleIQ(IQ) throws org.jivesoftware.openfire.auth.UnauthorizedException,public void initialize(org.jivesoftware.openfire.XMPPServer) ,public boolean performNoSuchUserCheck() ,public void process(Packet) throws org.jivesoftware.openfire.PacketException<variables>private static final Logger Log,protected org.jivesoftware.openfire.PacketDeliverer deliverer,protected org.jivesoftware.openfire.SessionManager sessionManager