Sponsored Content
Top Forums Shell Programming and Scripting Calculate time difference between pst and pdt dates in perl Post 302782659 by praveen265 on Tuesday 19th of March 2013 09:16:42 AM
Old 03-19-2013
RedHat Calculate time difference between pst and pdt dates in perl

Hi,

how to calculate the time difference between PST date and PDT date in perl scripting.

date1: Mon Dec 31 16:00:01 PST 2015
date2: Tue Mar 19 06:09:30 PDT 2013

and also difference between PST-PST and PDT-PDT

need difference in months or days (months prefereble).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to calculate this time difference

Hi, Please help me in calculating the time difference between below mentioned timestamps. a=07/17/2007 02:20:00 AM MST b=07/17/2007 02:07:46 AM MST Thanks (2 Replies)
Discussion started by: Prat007
2 Replies

2. Shell Programming and Scripting

How to calculate the time difference...

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. ssh -l ora${sid} ${primaryhost} "tail -2 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" |head -1 | awk '{print echo "PREVIOUS:-- Start Date&Time: " $3,$4,echo "|| End Date&Time:... (1 Reply)
Discussion started by: suri.tyson
1 Replies

3. Shell Programming and Scripting

How to calculate the time difference.

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. ssh -l ora${sid} ${primaryhost} "tail -1 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" | awk '{print $3,$4,$5,$6}' >> ${RESULTFILE} The output comes as below: 2008-09-30 06.00.01... (2 Replies)
Discussion started by: suri.tyson
2 Replies

4. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

5. Shell Programming and Scripting

Calculate the Time stamp difference

hi, I have a log file which gives time stamps hh:mm:ss.sssss format in which hh- hours , mm -minutes ss.sssss - seconds.microseconds I need to calculate the time diff between sent time stamp and received time stamp .... could any one please help me.. i am tryin to write a script but... (2 Replies)
Discussion started by: firestar
2 Replies

6. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

7. Shell Programming and Scripting

How to Calculate the difference between two dates?

I want the difference between two following date using scripts in terms of no.of days. How I can accomplish this. lastdate=Tue Nov 13 10:30:56 2012 currdate=Wed Dec 15 15:58:21 PAKST 2012 Ouput should be like this: Your Password will expire after = 32 Days on Wed Dec 15 15:58:21 PAKST... (1 Reply)
Discussion started by: m_raheelahmed
1 Replies

8. Shell Programming and Scripting

Shell script to calculate difference between 2 dates

shell script to calculate difference between 2 dates (3 Replies)
Discussion started by: gredpurushottam
3 Replies

9. Shell Programming and Scripting

Calculate time difference

I have time in a file in HH:MM:SS format as it contents(its not the file creation time). i need this to be converted to epoch time or time since 1970. The time is written into that file by a script, which i cannot modify. Im using AIX machine $ cat abc.txt 10:29:34 (2 Replies)
Discussion started by: gpk_newbie
2 Replies

10. Shell Programming and Scripting

Calculate time difference between two lines

i grepped the time stamp in a file as given below now i need to calculate time difference file data: 18:29:10 22:15:50 (5 Replies)
Discussion started by: vivekn
5 Replies
pipcs(1)						      General Commands Manual							  pipcs(1)

NAME
pipcs - report status of POSIX interprocess communication facilities SYNOPSIS
qname]] DESCRIPTION
displays certain information on active POSIX interprocess communication facilities. When no options are specified, displays information in short format for the POSIX message queues and POSIX named semaphores that are currently active in the system. Options The following options restrict the display to the corresponding facilities. (none) This is equivalent to Display details for the POSIX message queue specified in the qname argument. Display the list of processes and users using the POSIX message queues. Display information on active POSIX message queues. Display information on active POSIX named semaphores. Display the creation time and last modification time of the POSIX message queues. The options, and can be used only with the option. The options and are mutually exclusive. The following options add columns of data to the display. See "Column Description" below. (none) Display default columns: for all facilities: Display all columns, as appropriate. This is equivalent to Display largest-allowable-size information: for POSIX message queues: Display information on outstanding usage: for POSIX message queues: for POSIX named semaphores: Column Descriptions The column headings and the meaning of the columns in an listing are given below. The columns are printed from left to right in the order shown below. Facility type: POSIX message queue POSIX named semaphore The facility access modes and flags. The mode consists of nine characters that are interpreted as three sets of three characters each. The first set refers to the owner's permissions, the next to permissions of others in the group of the facility entry, and the last to all others. Within each set, the first character indicates permission to read, the second character indicates permission to write or alter the facility entry, and the last character is currently unused. Read permission is granted. Write permission is granted. Alter permission is granted. The indicated permission is not granted. The login name of the owner of the facility entry. The group name of the group of the owner of the facility entry. The reference count value of the facility entry. Reference count of the POSIX message queue represents number of simultaneous open for the associated one. Similarly reference count of the POSIX named semaphore represents number of process referencing the associated one. The name of the facility entry. The number of messages currently outstanding on the associated POSIX message queue. The maximum number of messages allowed on the associated POSIX message queue. The maximum number of bytes allowed in messages outstanding on the associated POSIX message queue. The current value on the associated POSIX named semaphore. The initial value hold on the associated POSIX named semaphore. WARNINGS
produces only an approximate indication of actual system status because system processes are continually changing while is acquiring the requested information. Do not rely on the exact field widths and spacing of the output, as these will vary depending on the system, the release of HP-UX, and the data to be displayed. EXAMPLES
List the processes and users using the POSIX message queues. Note that "None" is displayed if there are no processes using the POSIX mes- sage queue. pipcs -qP /mq/0 : 1234457645 (root) 5433483354 (vts) /mq/1 : None /mq/2 : 8344835378 (user1) List the processes and users using the POSIX message queue pipcs -qP -N /mq/2 /mq/2 : 8344835378 (user1) List the creation time and last modification time of the POSIX message queues. Ctime denotes creation time and Ltime denotes last modifi- cation time. pipcs -qT /mq/0 : Ctime : Mon Feb 4 05:06:40 PST 2006 Ltime : Mon Feb 6 11:06:40 PST 2006 /mq/abcd : Ctime : Mon Feb 2 03:06:40 PST 2006 Ltime : Mon Feb 5 03:06:40 PST 2006 List the creation time and last modification time of the POSIX message queue pipcs -qT -N /mq/0 /mq/0 : Ctime : Mon Feb 4 05:06:40 PST 2006 Ltime : Mon Feb 6 11:06:40 PST 2006 FILES
Group names User names SEE ALSO
pipcrm(1), mq_close(2), mq_open(2), mq_receive(2), mq_send(2), mq_unlink(2), sem_close(2), sem_open(2), sem_post(2), sem_unlink(2), sem_wait(2). pipcs(1)
All times are GMT -4. The time now is 09:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy