[rt-users] Date.pm small query

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Jan 11 12:13:35 EST 2007


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
>


-- 
Best regards, Ruslan.



More information about the rt-users mailing list