Veritas-bu

RES: [Veritas-bu] Convert "English Time" back to "seconds past the epoch"

2005-02-02 07:30:30
Subject: RES: [Veritas-bu] Convert "English Time" back to "seconds past the epoch"
From: carlos_listas AT yahoo.com DOT br (Carlos Alberto Lima dos Santos)
Date: Wed, 2 Feb 2005 10:30:30 -0200
        Hi Mariannne

        I use the perl function below to convert to epoch time.

timegm($sec, $min, $hours, $mday, $mon, $year);

Ex.:


#!/usr/bin/perl
use Time::Local;

   $Time = timegm(0,10,23,7,1,2005);
   print ($Time,"\n");



T+

Carlos Alberto Lima dos Santos 
Eng. de Computação
Campinas-SP - Brasil
* carlos_listas AT yahoo.com DOT br
icq 123987362

-----Mensagem original-----
De: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] Em nome de Marianne van 
den
Berg
Enviada em: quarta-feira, 2 de fevereiro de 2005 09:16
Para: NBUList (E-mail)
Assunto: [Veritas-bu] Convert "English Time" back to "seconds past the
epoch"
Prioridade: Alta

Hi all

I desperately need help - I need to use the following output to populate and
assign media manually to volDB:

000408  HCART     NONE     -      -     -     ---           -         109
11/11/2004 00:10     ---      ---   Scratch   
000411  HCART     NONE     -      -     -     ---           -          38
01/08/2005 19:02  01/07/2005 00:01  Live        
000416  HCART     TLD      0      3     -     00_000_TLD    -          55
01/24/2005 19:06  01/20/2005 17:05  Live        
000419  HCART     TLD      0      5     -     00_000_TLD    -          46
10/15/2002 15:26  03/20/2003 10:46  NetBackup    

I can do a 'vmadd' based on the above output, but I also need to assign the
media, using fields 12 and 13 (e.g. 01/24/2005 19:06). The problem is that
"vmquery -assignbyid" needs 'assigntime' in 10-digit format. How can I
convert the date and time?  (Testing on Solaris, need to do this on Linux.)

Regards

Marianne van den Berg
Professional Services
Lechabile Storage Solutions (PTY) Ltd
Tel: +27 (0)11 519 8134
Fax: +27 (0)11 519 8147
Mobile: +27 (0)82 468 8107
Email: Mariannev AT LechabileSS.co DOT za
This e-mail and attachments relating thereto, is intended for the
above-mentioned recipient. If you have received this e-mail in error, kindly
notify the sender and delete it immediately as it contains information
relating to the official business of Lechabile Storage Solutions (Pty)
Limited, which is confidential, legally privileged and proprietary to
Lechabile Storage Solutions (Pty) Limited. Lechabile Storage Solutions (Pty)
Limited does not own and endorse any other content. The views and opinions
expressed in this e-mail are those of the sender unless clearly stated as
being those of Lechabile Storage Solutions (Pty) Limited.



_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu