Net::ICal::Time -- represent a time and date


Net::ICal::Time -- represent a time and date


    $t = Net::ICal::Time->new( epoch => time );
    $t = Net::ICal::Time->new( ical => '19970101' );
    $t = Net::ICal::Time->new( ical => '19970101T120000',
        timezone => 'America/Los_Angeles' );
    # Eventually ...
    $t = Net::ICal::Time-new( iso => '1997-10-14' );
    # or other time formats ...
    # Not yet implemented
    $t = Net::ICal::Time->new(
        second => 12,
        minute => 5,
        hour => 6,
        day => 10,
        month => 9,
        year => 1997,
    # Not yet implemented
    $t2 = $t->add( hour => '6' );
=head1 WARNING

This is ALPHA QUALITY CODE. Due to a roundoff error in Date::ICal, which it's based on, addition and subtraction is often one second off. Patches welcome. See the README that came with this module for how you can help.


Time represents a time, but can also hold the time zone for the time and indicate if the time should be treated as a date. The time can be constructed from a variey of formats.



Creates a new time object given one of:

If neither of these arguments is supplied, the value will default to the current date.

WARNING: Timezone handling is currently in flux in Net::ICal, pending Date::ICal awareness of timezones. This may change the call syntax slightly.


Create a new copy of this time.


Accessor to the timezone. Takes & Returns an Olsen place name (``America/Los_Angeles'', etc. ) , an Abbreviation, 'UTC', or 'float' if no zone was specified.

THIS IS NOT YET IMPLEMENTED. Date::ICal does not yet support timezones.


Takes a duration string or Duration and returns a Time that is the sum of the time and the duration. Does not modify this time.


Subtract out a time of type Time and return a Duration. Does not modify this time.


Change the time to what it would be in the named timezone. The zone can be an Olsen placename or ``UTC''.

THIS FUNCTION IS NOT YET IMPLEMENTED. We're waiting on Date::ICal to provide this function.

 Net::ICal::Time -- represent a time and date