@Override
    public void execute(@Nonnull final SessionData data, final Element command )
    {
        final Locale preferredLocale = SessionManager.getInstance().getLocaleForSession(data.getOwner());

        final DataForm form = new DataForm(DataForm.Type.result);
        form.setTitle(LocaleUtils.getLocalizedString("commands.generic.ping.form.title", preferredLocale));

        final FormField field = form.addField();
        field.setType(FormField.Type.text_single);
        field.setLabel(LocaleUtils.getLocalizedString("commands.generic.ping.form.field.timestamp.label", preferredLocale));
        field.setVariable("timestamp");
        field.addValue( XMPPDateTimeFormat.format(new Date()) );

        command.add(form.getElement());
    }
A (very) basic ad-hoc command that returns the server time in UTC. The ad-hoc command implemented in this class
differs from most others in the fact that it has no restrictions in what entity is allowed to execute/use it.

@author Guus der Kinderen, guus.der.kinderen@gmail.com
xmppserver/src/main/java/org/jivesoftware/openfire/commands/generic/Ping.java