Add or Subtract the hours,minutes or seconds in the the time variable
Hello All,
I am working on script where I need to add hours,minutes or seconds in the time.Time is not the current but it could be future time.I thought I can store that time in variable and add hours.minutes or second but I am not able to add that in the time that is stores in a variable.
Time is in specific format
I have another way which I Incorporated in my script which changes the time into GMT.But the problem is this method cause an issue when daylight saving system starts.MDT is fine during these days but if someone choose MST time zone it creates an issue.I am working on Linux system(x86_64) and bash shell
i find a script to calculate hours of job i(nclude extraordinary)
i make a script to calculate add and subtract two hours (format hh:mm:ss) (7 Replies)
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)
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)
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)
OK, I am by no means a programmer...
I have been given the task to do some automation scripts. I have got most of it working from snippets I have found on the Web.
One requirement has me stumped.
The initial timing file created by the user is a comma delimited in the following format.... (4 Replies)
Hi guys.
I am trying to subtract 10 minutes from the current Unix system date and time. I have the datecalc provided here but it is mainly the date and not the time. Please check on how can i subtract 10 minutes from the current time using datecalc or any other shell scripting that will... (2 Replies)
I have a problem. I am working on a Call Detail Report system. Come to find out the phone switch does not report in seconds. It is a 5 digit field that reports h:mm:ss
The problem is I have 1-5 digit numbers
Ie 1 = 1 second and should be reported as 0:00:01
22 should be 0:00:22
321 should be... (5 Replies)
Hi, please help with below time conversion to minutes.
one column values:
2 minutes 16 seconds 420 msec
43 seconds 750 msec
0 days 3 hours 29 minutes 58 seconds 480 msec
11 seconds 150 msec
I need output in minutes(total elapsed time in minutes) (2 Replies)
Discussion started by: ramu.badugula
2 Replies
LEARN ABOUT DEBIAN
ns_fmttime
ns_time(3aolserver) AOLserver Built-In Commands ns_time(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_time, ns_fmttime, ns_gmtime, ns_localtime, - commands
SYNOPSIS
ns_fmttime time ?format string?
ns_gmtime
ns_localtime
ns_time
_________________________________________________________________DESCRIPTION
ns_time: Returns the value of time in seconds since 00:00:00 UTC, January 1, 1970. This return value is suitable as input to the ns_http-
time function to get the current time.
ns_fmttime: Formats the time string,time,according to the format provided in format string. If no format is provided, defaults to "%a %b %e
%H:%M:%S %Z %Y".
ns_gmttime: Returns a Tcl list of the pieces of the current Greenwich Mean Time. The pieces are
seconds (0-59)
minutes (0-59)
hours (0-23)
dayofmonth (1-31)
monthofyear (0-11)
year (year-1900)*
dayofweek (Sunday=0)
dayofyear (0-365)
1 if Daylight Savings Time is in effect
ns_localtime: Returns a Tcl list of the pieces of the current local time. The pieces are
seconds (0-59)
minutes (0-59)
hours (0-23)
dayofmonth (1-31)
monthofyear (0-11)
year (year-1900)*
dayofweek (Sunday=0)
dayofyear (0-365)
1 if Daylight Savings Time is in effect
EXAMPLES
ns_fmttime [ns_time] returns: Tue Nov 12 15:14:47 2002 ns_fmttime [ns_time] "%Y%m%d" returns: 20021112
SEE ALSO
ns_httptime
KEYWORDS AOLserver 4.0 ns_time(3aolserver)