[rt-users] Date.pm small query

Roy El-Hames rfh at pipex.net
Thu Jan 11 12:31:36 EST 2007


Sorry to be a pain Ruslan, but now I need to know how to convert unix 
into ISO ..
I thought :
$newtime = $dateobj->Set( Format => 'ISO',Value => $newunixtime);
should do the trick ??
Roy

Ruslan Zakirov wrote:
> On 1/11/07, Roy El-Hames <rfh at pipex.net> wrote:
>> Hi there;
>> Is there a way to convert for example:
>> 07 Jan 2007 13:23:23
>> to unix time
>>
>> I tried
>> my $dateobj = RT::Date->new($RT::SystemUser);
>> $unixtime = $dateobj->Set( Format => 'unix', Value => $d );
> try
> my $dateobj = RT::Date->new($RT::SystemUser);
> $dateobj->Set( Format => 'unknown', Value => '07 Jan 2007 13:23:23' );
> print $dateobj;
>
>>
>> where $d = "07 Jan 2007 13:23:23" but I don't seem to get the unix time,
>> does it have to be formated as "2007-01-07 13:23:23"
>> any alternatives??
>>
>> Roy
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
>




More information about the rt-users mailing list