I am reading from a csv file name: dDos_flows.csv, which has whole lot of entries which I am storing them all in a array & filtering out data2. which is: startTime 1421744559358 1421744614728 1421744621032 1421724767767 Now this particular column has the time in the unix timestamp format, which I intent to convert it into standard time format & place it back into the dDos_flows.csv file.

The output I am getting: Wed Dec 31 16:00:00 1969 Thu Apr 17 13:15:58 47023 Fri Apr 18 04:38:48 47023 Fri Apr 18 06:23:52 47023 Sat Aug 31 11:36:07 47022 Thu Jan 30 16:28:48 47023 Wed Apr 16 09:25:01 47023 This is not the correct time. Besides I am getting some warning as well Use of uninitialized value $data2 in localtime at D:\ddos.pl line 20, <$fh> li ne 1. Wed Dec 31 16:00:00 1969 Use of uninitialized value $data2 in localtime at D:\ddos.pl line 20, <$fh> li ne 2. Wed Dec 31 16:00:00 1969 Argument "\x{73}\x{74}..." isn't numeric in localtime at D:\ddos.pl line 20, <$f h> line 3. Use of uninitialized value $data2 in localtime at D:\ddos.pl line 20, <$fh> li ne 22. Wed Dec 31 16:00:00 1969 Use of uninitialized value $data2 in localtime at D:\ddos.pl line 20, <$fh> li ne 23. Wed Dec 31 16:00:00 1969 Use of uninitialized value $data2 in localtime at D:\ddos.pl line 20, <$fh> li ne 24. Wed Dec 31 16:00:00 1969


In reply to Re^2: localtime function by rsodhia
in thread localtime function by rsodhia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.