Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

timetrans(1p) [debian man page]

TIMETRANS(1p)						User Contributed Perl Documentation					     TIMETRANS(1p)

NAME
timetrans - Converts time into time SYNOPSIS
timetrans [units-options] [-count] DESCRIPTION
timetrans converts time from one type of unit to another. If any of the units options are specified, then timetrans will convert those time units into the number of seconds to which they add up. If given the count option, timetrans will convert that number of seconds into the appropriate number of weeks, days, hours, minutes, and seconds. The converted result is printed out. Units options cannot be specified in the same execution as the count option, and vice versa. timetrans is intended for use with DNSSEC-Tools, for calculating a zone's expiration time. OPTIONS
Units Options The converted value of each unit is totaled and a single result printed. -seconds seconds Count of seconds to convert to seconds. -minutes minutes Count of minutes to convert to seconds. -hours hours Count of hours to convert to seconds. -days days Count of days to convert to seconds. -weeks weeks Count of weeks to convert to seconds. Count Option The specified seconds count is converted to the appropriate number of weeks, days, hours, minutes, and seconds. -count seconds Count of seconds to convert to the appropriate set of units. Other Options timetrans has the following miscellaneous options. -Version Displays the version information for timetrans and the DNSSEC-Tools package. EXAMPLES
Example 1: Converting 5 days into seconds $(42)> timetrans -days 5 432000 Example 2: Converting 2 weeks into seconds $(43)> timetrans -w 2 1209600 Example 3: Converting 8 days and 8 hours into seconds $(44)> timetrans -d 8 -hours 8 720000 Example 4: Converting 1 week, 1 day, and 8 hours into seconds $(46)> timetrans -w 1 -days 1 -h 8 720000 Example 5: Converting 14 weeks, 4 days, 21 hours, 8 minutes, and 8 seconds into seconds $(47)> timetrans -w 14 -d 4 -h 21 -m 8 -s 8 8888888 Example 6: Converting 720000 seconds into time units $(48)> timetrans -c 720000 1 week, 1 day, 8 hours Example 7: Converting 1814421 seconds into time units $(49)> timetrans -c 1814421 3 weeks, 21 seconds Example 8: Converting 8888888 seconds into time units $(50)> timetrans -c 8888888 14 weeks, 4 days, 21 hours, 8 minutes, 8 seconds 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
zonesigner(8) Net::DNS::SEC::Tools::timetrans.pm(3) perl v5.14.2 2012-06-21 TIMETRANS(1p)

Check Out this Related Man Page

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)
Man Page