Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-30-2009, 09:51 PM
|
#1
|
|
LQ Newbie
Registered: Dec 2009
Posts: 3
Rep:
|
"at" command with day of week
Today, Wednesday 30 December 2009, at 8:00 AM, I entered the
following 'at' command:
at 9:30 AM Friday
I continued with my commands and ctl-D, and was surprised
to receive the following output:
job 96 at Sat Jan 1 09:30:00 2011
A quick check with atq confirmed:
96 Sat Jan 1 21:30:00 2011 a atusr
I really was expecting to see Fri, Jan 1, 2010.
Can anyone explain this?
(BTW, I'm running Ubuntu Karmic, pretty much out-of-the-box.)
|
|
|
|
12-30-2009, 11:28 PM
|
#2
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,594
|
What do you get when you run "date"? Does it tell you your system time is set for 2009 or 2010?
|
|
|
|
12-31-2009, 08:57 AM
|
#3
|
|
LQ Newbie
Registered: Dec 2009
Posts: 3
Original Poster
Rep:
|
"at" -- system date/time OK
Yes, "date" shows correct date and time (thanks, ntpd!). Also,
to keep the post short I didn't mention some variations of the
time specification that I also tried. It's now 6:40 AM, Thu
31 Dec. Here are some other "at" commands and results:
1. "at 8:00 AM today" gives job at "Thu Dec 31 08:00:00 2009"
2. "at 8:00 AM tomorrow" gives job at "Sat Jan 1 08:00:00 2011"
3. "at 8:00 AM + 24 hours" gives job at "Fri Jan 1 08:00:00 2010"
Strange, no?
|
|
|
|
12-31-2009, 12:08 PM
|
#4
|
|
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,832
|
That looks like a bug in the 'at' command. I have tried it in version 3.1.9 on Debian and it reproduces.
jlinkels
|
|
|
|
12-31-2009, 12:25 PM
|
#5
|
|
LQ Newbie
Registered: Dec 2009
Posts: 3
Original Poster
Rep:
|
"at" - it _is_ a bug
I did finally find the bug report page for "at", and this turns
out to be a very old bug - reported in 2006 and still active.
Given the complexity of the POSIX time specs, it isn't surprising
that there are quite a few parsing bugs in the "at" program; what
does surprise me is that they aren't using (or don't have) a well-
tested GNU library to do the parsing.
|
|
|
|
12-31-2009, 02:46 PM
|
#6
|
|
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,832
|
The date command calculates correctly. Indeed one wonders why these commands use different libraries.
jlinkels
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|