Sponsored Content
Full Discussion: Time difference in minutes
Top Forums Shell Programming and Scripting Time difference in minutes Post 302921241 by jayadanabalan on Thursday 16th of October 2014 02:53:43 AM
Old 10-16-2014
Hi,

Thanks much for the reply.

I have both the times line after line. The code that you gave me will work only if the time is in the same line i believe.

Any way we could find the difference from this 2 lines ?

Thanks
Jay
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to display time in minutes n seconds...

Hi all, may i know how to display time in minutes and seconds(may be milliseconds and even smaller that ) in shell scripts.... (1 Reply)
Discussion started by: santy
1 Replies

2. UNIX for Advanced & Expert Users

Adding # minutes to current time...

Hi all, Looking for a way to add lets say 10 minutes to the current time output should look like 7:15 AM or 7:15 PM. I know that gdate could do this for me but unfortunately its not available on the system I'm working on. So if any one know any way I can accomplish this using the date command it... (7 Replies)
Discussion started by: gptavares
7 Replies

3. Shell Programming and Scripting

Difference in day-hours-minutes-seconds format

Hi experts, I am reading two log files and passing dates as output to a txt file. Code is given below: echo "Start Time:" >> Report.txt cat start.log | while read LINE1 do echo $DATE1 >> Report.txt done echo "End Time:" >> Report.txt cat end.log | while read LINE2 ... (7 Replies)
Discussion started by: Sreejith_VK
7 Replies

4. Shell Programming and Scripting

how to find the time before 30 minutes

Hi All, I want to find out the time before 30 minutes. I am able to do with in hours limit. date Fri Aug 21 06:50:00 BST 2009 TZ=CST+1 date Fri Aug 21 04:50:02 CST 2009 Can any one please help me (6 Replies)
Discussion started by: vikash_k
6 Replies

5. Shell Programming and Scripting

Process Time in hours or minutes only

Hi i want to print the time of a process in hours only..(or) in minutes only.Is there anyway to print the process such like that when i give the commnand like following #ps -eo pid,time PID TIME 412 01:49:32 481 00:03 it shows in HH:MM:SS format: Could anyone... (1 Reply)
Discussion started by: srikanthg
1 Replies

6. Shell Programming and Scripting

subtract minutes from time

i have the time 20100421043335 in format (date +%Y%m%d%H%M%S),and i want to be able to get the previous time 2 minutes ago,which is 20100421043135 (9 Replies)
Discussion started by: tomjones
9 Replies

7. 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

8. Shell Programming and Scripting

grep the time within given minutes

Mar 26 15:25:11 : jdoe : TTY=pts/2 ; PWD=/home/jdoe ; USER=root ; COMMAND=/usr/bin/su - Mar 26 15:28:52 : jdoe : 3 incorrect password attempts ; TTY=pts/2 ; PWD=/home/jdoe ; USER=root ; COMMAND=/usr/bin/su - Mar 25 12:23:07 : jdoe : TTY=pts/2 ; PWD=/home/jdoe ; USER=root ; ... (6 Replies)
Discussion started by: Daniel Gate
6 Replies

9. Shell Programming and Scripting

How to get a time minus 60 minutes?

Hello, date --date '-60 min ago' +'%Y-%m-%d %H:%M:%S,%3N' Above command gives the date and time minus 60 minutes but the problem i am facing is, i do not want to hardcode the value 60 it is stored in a variable var=60 now if i run below command , i get error date --date '-$var min... (3 Replies)
Discussion started by: Ramneekgupta91
3 Replies

10. Shell Programming and Scripting

Check file creation Time minutes and if file older then 5 minutes execute some stuff

Hello all, Info: System RedHat 7.5 I need to create a script that based on the creation time, if the file is older then 5 minutes then execute some stuff, if not exit. I thought to get the creation time and minutes like this. CreationTime=$(stat -c %y /tmp/test.log | awk -F" " '{ print... (3 Replies)
Discussion started by: charli1
3 Replies
timezone(5)							File Formats Manual						       timezone(5)

NAME
timezone, dst - difference between Universal (Greenwich mean) time and Local time VALUES
Default A default value of indicates that the default value for the timezone tunable (420 minutes west of Greenwich, England ) is to be interpreted as a daylight savings time value. Allowed values The value for the tunable should correspond to a defined time zone, and thus should be at least a multiple of 15 minutes. More commonly the value will be a multiple of 60 or 30 minutes, corresponding to an hour or half-hour time zone. The value of the tunable specifies if the time is with daylight savings or not. When the value is set to then the system is using daylight savings time, and if it is set to the system is not. Recommended values Any allowed value is equally recommended. However, the chosen value should correspond to the time zone and daylight saving scheme of the system site or to a time zone and daylight saving scheme which has meaning for applications or users. DESCRIPTION
The tunable is the difference between Greenwich mean time (Universal Time) and local time, expressed as minutes west of Greenwich, England. The tunable indicates whether the tunable is to be interpreted as a standard or daylight savings time value. These tunables provide a way to convert between Grenwich Mean Time (or Universal Time) and local time. Although is a tunable, it is not used to affect the behavior of the system. Rather, it is used to remember time zone information when the system is rebooted. This infor- mation is returned by under HP-UX extensions. The tunable is independent of other methods of indicating time zones. For example, gets or sets the time in either Universal or local time by using the environment variable. In this case the tunable has no effect. In general, it is best to refer to the manpages for specific system calls such as and to check if there is a dependency on the tunable. Who Is Expected to Change This Tunable? Anyone. Restrictions on Changing Changes to these tunables take effect at the next reboot. When Should the Value of This Tunable Be Changed? These tunables may be changed to match the system's geographic time zone or the time zone of users. What Other Tunable Values Should Be Changed at the Same Time? The and tunables should always be set and interpreted as a pair of values. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
and were developed by HP. Tunable Kernel Parameters timezone(5)
All times are GMT -4. The time now is 05:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy