Bug 683557

Summary: RFE: Allow argument to specify time [patch]
Product: [Fedora] Fedora Reporter: James Antill <james.antill>
Component: rktimeAssignee: Mohammed Imran <imranceh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: imranceh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-06 20:09:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description James Antill 2011-03-09 17:22:26 UTC
Description of problem:

 Wanted to be able to see "into the future" for DST etc.
 The format is kind of horrible (thanks date -d :), but the only way I know to have a nice format is require perl and it's date/time parsing module.

% diff -u /usr/bin/rktime /tmp/rktime
--- /usr/bin/rktime	2004-05-09 02:38:16.000000000 -0400
+++ /tmp/rktime	2011-03-09 12:21:21.235025689 -0500
@@ -142,7 +142,12 @@
 #-----------------------------------------------------------------------
 # Reference time saved to a variable, so the calculation of
 # date and time for all the zones is based on the same base.
-rt=$(TZ=UTC /bin/date)
+if [ "x$1" != "x" ]; then
+  rt=$(TZ=UTC /bin/date -d "$1")
+  shift;
+else
+  rt=$(TZ=UTC /bin/date)
+fi
 
 #-----------------------------------------------------------------------
 # Set defaults

Version-Release number of selected component (if applicable):

% rpm -q rktime
rktime-0:0.6-2.fc13.noarch

Comment 1 Bug Zapper 2011-05-30 11:03:36 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Fedora End Of Life 2012-08-06 20:09:02 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping