Converting Unix time stamp to a date format.

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Kevin Buettner
Dátum:  
Tárgy: Converting Unix time stamp to a date format.
On Jan 16, 11:11am, Carl Parrish wrote:

> From the info you gave me I think I'll be able to fix my immediate need.
> However as I play with Mozilla to do the convertion does anyone have any
> idea's on the best way to go about making a generic conversation tool?


Maybe something along the lines of:

    perl -ne 'print scalar(localtime($_)), "\n"'


E.g...

    ocotillo:ptests$ perl -ne 'print scalar(localtime($_)), "\n"'
    1042742855
    Thu Jan 16 11:47:35 2003
    1042742844
    Thu Jan 16 11:47:24 2003
    0
    Wed Dec 31 17:00:00 1969


Kevin