How to get the time seconds UTC - SGI

This is a discussion on How to get the time seconds UTC - SGI ; Hi , I want to get the system time seconds since `00:00:00 1970-01-01 UTC' On the Linux I can use "date +%s", but I find the date command without %s parameter on Irix, Who can tell me how to get ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: How to get the time seconds UTC

  1. How to get the time seconds UTC

    Hi ,
    I want to get the system time seconds since `00:00:00 1970-01-01
    UTC'
    On the Linux I can use "date +%s", but I find the date command without
    %s parameter on Irix, Who can tell me how to get the seconds since
    `00:00:00 1970-01-01 UTC' on Irix.


    Thanks a lot,
    Bill

  2. Re: How to get the time seconds UTC

    "billchen" wrote in message
    news:c7dd66f1.0311060030.12893975@posting.google.c om...
    > Hi ,
    > I want to get the system time seconds since `00:00:00 1970-01-01
    > UTC'
    > On the Linux I can use "date +%s", but I find the date command without
    > %s parameter on Irix, Who can tell me how to get the seconds since
    > `00:00:00 1970-01-01 UTC' on Irix.
    >


    On my Indigo2 with IRIX 6.5.20m, the command "date +%s" works exactly as
    is does on my PC with RedHat Linux 6.x. Try "date --help" for a list of all
    command-line options.

    Norm



  3. Re: How to get the time seconds UTC

    * "Norm Dresner"
    | On my Indigo2 with IRIX 6.5.20m, the command "date +%s" works
    | exactly as is does on my PC with RedHat Linux 6.x. Try "date
    | --help" for a list of all command-line options.

    You probably invoke GNU date. IRIX date has no %s and no --help:
    % which date
    /sbin/date
    % date --help
    UX:date: ERROR: Bad conversion
    UX:date: TO FIX: Usage:
    date [-u] [+format]
    date [-u | -n] [[mmdd] HHMM | mmddHHMM[[cc]yy]][.ss]
    date [-a [-]sss.fff]

    To the OP: either install a version of date which has %s (check GNU),
    or use eg. perl:
    % perl -e 'print time(), "\n"'
    1068134670

    R'

  4. Re: How to get the time seconds UTC

    "Norm Dresner" wrote in message
    news:Rdtqb.29383$Ec1.2695680@bgtnsc05-news.ops.worldnet.att.net...
    > "billchen" wrote in message
    > news:c7dd66f1.0311060030.12893975@posting.google.c om...
    > > Hi ,
    > > I want to get the system time seconds since `00:00:00 1970-01-01
    > > UTC'
    > > On the Linux I can use "date +%s", but I find the date command without
    > > %s parameter on Irix, Who can tell me how to get the seconds since
    > > `00:00:00 1970-01-01 UTC' on Irix.
    > >

    >
    > On my Indigo2 with IRIX 6.5.20m, the command "date +%s" works exactly

    as
    > is does on my PC with RedHat Linux 6.x. Try "date --help" for a list of

    all
    > command-line options.
    >


    WHOOPS!

    % date --version
    date (GNU sh-utils) 2.0
    %

    At least on my Linux PC I have by default the GNU version installed and
    likely that's what you're using there too so on your SGI install sh-utils
    from the Freeware CD or download it from the SGI web-site.

    Norm




  5. Re: How to get the time seconds UTC

    billchen schrieb:

    > Hi ,
    > I want to get the system time seconds since `00:00:00 1970-01-01
    > UTC'
    > On the Linux I can use "date +%s", but I find the date command without
    > %s parameter on Irix, Who can tell me how to get the seconds since
    > `00:00:00 1970-01-01 UTC' on Irix.
    >
    >
    > Thanks a lot,
    > Bill


    man time(2)
    man TIME(3F)
    --
    beyer.braunschweig@freenet.de


+ Reply to Thread