Re: Timestamp in the trace files

From: joel garry <joel-garry_at_home.com>
Date: Wed, 6 Jan 2010 15:22:49 -0800 (PST)
Message-ID: <0b2de7b1-f2e9-4cad-9c47-647cdeb4fade_at_35g2000yqa.googlegroups.com>



On Jan 6, 2:22 pm, Maxim Demenko <mdeme..._at_gmail.com> wrote:
> On 06.01.2010 22:48, Mladen Gogala wrote:
>
>
>
> > On Wed, 06 Jan 2010 21:10:56 +0100, Maxim Demenko wrote:
>
> >> Sorry, of course, i am interpreting your words like it better suit my
> >> needs ;-)
> >> But either your meant to say "The application has run on 05-Jan-2010" -
> >> in that case my previous post still applies, or it run indeed on
> >> 05-Jan-2009 and my math is wrong, but then it is unclear with "The
> >> result is January 28th, 2009, which is almost a year off".
>
> >> Best regards
>
> >> Maxim
>
> > Maxim, you helped me a lot! It works now. Here is the result, written in
> > The algorithm  is yours, I just had to apply it properly. Thanks again
> > for your help. I must be getting senile these days.
>
> > #!/usr/bin/perl -w
> > use strict;
> > sub cnv_tim($);
>
> > sub cnv_tim($) {
> >      my $A = shift;
> >      my ( $sec, $min, $hr, $dd, $mm, $yr ) =
> >        localtime( ( $A * 1024 ) / 1000000000 );
> >      $yr += 1900;
> >      $mm++;
> >      my $str = sprintf( "%d-%d-%d %d:%d:%d\n", $yr, $mm, $dd, $hr, $min,
> > $sec );
> >      return ($str);
> > }
> > map { print "tim=$_ -->  ", cnv_tim($_); } _at_ARGV;
>
> > Here is how to run it:
>
> > mgogala_at_nycwxp2622:/tmp$ ./ttt 1233122413959653
> > tim=1233122413959653 -->  2010-1-5 13:49:11
>
> > You can put as many "tim" timestamps on the command line as necessary,
> > the script will convert them all, one line per timestamp. Some people
> > object to my function declarations but I used to program in C and have
> > carried over some habits.
>
> I'm glad, it works for you.
> The credit goes of course to Andrew Zitelli, i didn't participate in his
> test, but tested his assumption a couple of times on systems i had
> access to - and it seems to be the correct rule.

I did participate, but totally forgot until you posted this, though it sounded familiar... :-)

>
> _at_Steve
> i agree, it seems, the official documentation is incomplete, keep in
> mind the differences between solaris/linux and windows (and ...) platforms.
>

Not to mention changes and bugs over time, so to speak.

jg

--
_at_home.com is bogus.
"•	Prevent privileged IT staff from accessing the data they are
charged with managing" - Roxana Bradescu Senior Director, Oracle
Database Security Product Marketing
Received on Wed Jan 06 2010 - 17:22:49 CST

Original text of this message