++ed by:

2 non-PAUSE users.

Ryan Eatmon


Net::Jabber::Query::Time - Jabber IQ Time Module


  Net::Jabber::Query::Time is a companion to the Net::Jabber::Query module.
  It provides the user a simple interface to set and retrieve all parts
  of a Jabber Time query.


  To initialize the Query with a Jabber <iq/> and then access the time
  query you must pass it the XML::Parser Tree array from the 
  Net::Jabber::Client module.  In the callback function for the iq:

    use Net::Jabber;

    sub iqCB {
      my $iq = new Net::Jabber::IQ(@_);
      my $time = $iq->GetQuery();

  You now have access to all of the retrieval functions available.

  To create a new Query time to send to the server:

    use Net::Jabber;

    $client = new Net::Jabber::Client();

    $iq = new Net::Jabber::IQ();
    $time = $iq->NewQuery("jabber:iq:time");


  Using $time you can call the creation functions below to populate the 
  tag before sending it.

  For more information about the array format being passed to the CallBack
  please read the Net::Jabber::Client documentation.

Retrieval functions

    $utc      = $time->GetUTC();
    $timezone = $time->GetTZ();
    $display  = $time->GetDisplay();

Creation functions

                   display=>'2000/03/14 09:50 AM');

    $time->SetDisplay('2000/04/19 01:50 PM');


Retrieval functions

  GetUTC() - returns a string with the universal time constant time in 
             the <query/>.

  GetTZ() - returns a string with the timezone in the <query/>.

  GetDisplay() - returns a string with the displayin the <query/>.

Creation functions

  SetTime(utc=>string,     - set multiple fields in the <iq/> at one
          tz=>string,        time.  This is a cumulative and over
          display=>string)   writing action.  If you set the "utc" 
                             twice, the second setting is what is
                             used.  If you set the tz, and then
                             set the display then both will be in the
                             <query/> tag.  For valid settings read 
                             the specific Set functions below.

  SetUTC(string) - sets the universal time constant time for the 
                   <query/>.  The format for the UTC is:

                     yyyy - year
                     mm   - month
                     dd   - day
                     hh   - hour
                     nn   - minute
                     ss   - second

  SetTZ(string) - sets the timezone of the local client in the <query/>.

  SetDisplay(string) - sets the string to display as the local time in
                       UTC format in the remote client.


By Ryan Eatmon in May of 2000 for http://jabber.org..


This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.