Loading ...
Sorry, an error occurred while loading the content.

Re: Time Stamp format

Expand Messages
  • Damien Carbery
    ... The time function returns the number of seconds since 1 Jan 1970. localtime converts this into a list with the minutes, seconds, day, month etc. For
    Message 1 of 2 , Dec 29, 2005
    • 0 Attachment
      --- In perl-beginner@yahoogroups.com, "Mirza Abdullah Jan"
      <jan576pk@y...> wrote:
      >
      > Dear All
      > i get time stamp in this format in perl and get little bid confuse
      > about this format:
      > The format is "1124748402".
      > Pl let me know about ,what is Date, Time in this value..
      > thanks
      > Abdullah Jan
      >

      The 'time' function returns the number of seconds since 1 Jan 1970.
      'localtime' converts this into a list with the minutes, seconds, day,
      month etc.

      For example:
      perl -e 'print time'
      perl -e 'print localtime'
      perl -e 'print scalar localtime'

      Also look up the 'gmtime' function: perldoc -f gmtime
    Your message has been successfully submitted and would be delivered to recipients shortly.