Hi all!
I'm working on a HPUX system, and I was wondering if there is a simple way to convert a date from seconds (since 1970) to a normal date.
Thanks (2 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)
Need a little help developing a ksh script. Have read through Perderabo's datecalc routine and it does not seem to fit the function I am looking for. Basically what I am trying to do is find any file (in a specific directory) that was created within the last five minutes. I am not a programming... (3 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)
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... (9 Replies)
I have a list of time spans in seconds, and want to compute the time span
as hh:mm:nn
I am coding in bash and have coded the following. However, the results are
wrong as "%.0f" rounds the values.
Example:
ftm: 25793.5
tmspan(hrs,min,sec): 7.16 429.89 25793.50
hh: 7
mm: 10
ss:... (2 Replies)
Hello,
How can we convert date like format 20181004171050 in seconds ?
I can able to convert till date but failing for HHMMSS.
date -d "20181004" "+%s" output as 1538596800 .
But when i add hhmmss it is failing date -d "20181004172000" "+%s" result Invalid date
Kindly guide.
Regards (16 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
net::dns::sec::tools::timetrans
timetrans(3pm) User Contributed Perl Documentation timetrans(3pm)NAME
Net::DNS::SEC::Tools::timetrans - Convert an integer seconds count into text units.
SYNOPSIS
use Net::DNS::SEC::Tools::timetrans;
$timestring = timetrans(86488);
$timestring = fuzzytimetrans(86488);
DESCRIPTION
The timetrans() interface in Net::DNS::SEC::Tools::timetrans converts an integer seconds count into the equivalent number of days, hours,
and minutes. The time converted is a relative time, not an absolute time. The returned time is given in terms of days, hours, minutes,
and seconds, as required to express the seconds count appropriately.
The fuzzytimetrans() interface converts an integer seconds count into the equivalent number of weeks or days or hours or minutes. The unit
chosen is that which is most natural for the seconds count. One decimal place of precision is included in the result.
INTERFACES
The interfaces to the Net::DNS::SEC::Tools::timetrans module are given below.
timetrans()
This routine converts an integer seconds count into the equivalent number of days, hours, and minutes. This converted seconds count is
returned as a text string. The seconds count must be greater than zero or an error will be returned.
Return Values:
If a valid seconds count was given, the count converted into the
appropriate text string will be returned.
An empty string is returned if no seconds count was given or if
the seconds count is less than one.
fuzzytimetrans()
This routine converts an integer seconds count into the equivalent number of weeks, days, hours, or minutes. This converted seconds count
is returned as a text string. The seconds count must be greater than zero or an error will be returned.
Return Values:
If a valid seconds count was given, the count converted into the
appropriate text string will be returned.
An empty string is returned if no seconds count was given or if
the seconds count is less than one.
EXAMPLES timetrans(400) returns 6 minutes, 40 seconds
timetrans(420) returns 7 minutes
timetrans(888) returns 14 minutes, 48 seconds
timetrans(86400) returns 1 day
timetrans(86488) returns 1 day, 28 seconds
timetrans(715000) returns 8 days, 6 hours, 36 minutes, 40 second
timetrans(720000) returns 8 days, 8 hours
fuzzytimetrans(400) returns 6.7 minutes
fuzzytimetrans(420) returns 7.0 minutes
fuzzytimetrans(888) returns 14.8 minutes
fuzzytimetrans(86400) returns 1.0 day
fuzzytimetrans(86488) returns 1.0 day
fuzzytimetrans(715000) returns 1.2 weeks
fuzzytimetrans(720000) returns 1.2 weeks
COPYRIGHT
Copyright 2004-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
AUTHOR
Wayne Morrison, tewok@tislabs.com
SEE ALSO timetrans(1)perl v5.14.2 2012-06-18 timetrans(3pm)