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 );
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
Thanks that works;
Roy
Ruslan Zakirov wrote:> On 1/11/07, Roy El-Hames rfh@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
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
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@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
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
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);
The format is "what format is it coming in as. You want to look at
the various documetned output methods.
-jesse
Yes, that was exactly what I did, discovered I had a typo and managed to
sort it just before Ruslan reply …
Thanks to your self and Ruslan for you replies;
Roy
Jesse Vincent wrote: