NAME

ISO8601 - Class for handling conversions to/from unixtime and ISO8601 datetime

SYNOPSIS

use ISO8601;

# convert without instantiating
my $dtstring=time2iso(time());
my $unixtime=iso2time($dtstring);

DESCRIPTION

A collection of functions to handle the conversion to and from unixtime and iso8601-time.

CONSTRUCTOR

This class does not have an instantiator/constructor. The two methods are exported by default and can be used at any time.

METHODS

time2iso()

Converts from unixtime to ISO8601-time

Accepts these parameters in the following order:

Returns an ISO-string at the end of the conversion.

iso2time()

Converts an ISO string to unix datetime.

Only accepts one parameter: isotime. SCALAR. Required.

The ISO time string is given to the method and it converts it to iso.

Return the unixtime to the user.