Sponsored Content
Full Discussion: Bug in Gnu date?
Top Forums Shell Programming and Scripting Bug in Gnu date? Post 303025341 by apmcd47 on Wednesday 31st of October 2018 05:54:16 AM
Old 10-31-2018
Nope, still going it today, Weds Oct 31st. Maybe it's a Halloween thing Smilie I'll try it again tomorrow.

Funnily enough I tested this on a Solaris 11 system I have access to, which has Gnu Date installed as /usr/bin/gdate, and it has the same problem. This version of gdate is 8.16.

Andrew
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

GNU Date

I know there are some posts on getting the time with milliseconds included and I realize unix may not be the best on this. I have seem some posts where its advised to install the GNU date. Any one know where I can download this as I am struggling to find it. Alternatively - if you have... (5 Replies)
Discussion started by: frustrated1
5 Replies

2. Shell Programming and Scripting

Howto: easy date range iteration/counting on GNU systems in the shell

Should work in any shell, but requires GNU date, although GNU date seems only to be happy for input dates between 1902 and 2037, inclusive (49673 days). Assume $a and $b hold two dates, e.g. set a=2010-03-27 set b=2010-04-04 Marginally faster: iterator: seq -f "$a +%1.0f days" 1 50000 |... (0 Replies)
Discussion started by: laddiebuck
0 Replies

3. Linux

Date from GNU to BSD

Dear all, This should be simple but I cannot figure it out despite reading all the man pages. Could someone please help me translate this code (GNU date) to one that can be read by BSD date?: myDate=$(date -d "$h -$l days" +%Y/%m/%d), where h is a variable of the form DD/MM/YYYY, and l is... (3 Replies)
Discussion started by: thomchad
3 Replies

4. UNIX for Dummies Questions & Answers

Getting date -1 day not using GNU date

It's easy as pie to get the date minus one day on opensolaris: date -d "-1 day" +"%Y%m%d"run this command on our crappy Solaris 10 machines however (which I'm guessing doesn't have GNU date running on it) and you get: date: illegal option -- d date: illegal option -- 1 date: illegal option --... (5 Replies)
Discussion started by: rich@ardz
5 Replies

5. Shell Programming and Scripting

Converting a date to friday date and finding Min/Max date

Dear all, I have 2 questions. I have a file with many rows which has date of the format YYYYMMDD. 1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too. 2. After converting the date to... (10 Replies)
Discussion started by: 2001.arun
10 Replies

6. Linux

Bug in date command?

Why is the result of this command off (or less) by one hour date --date "1979-10-26 +54 hours" +%Y%m%d%H The result is 1979102805 It actually should be 1979102806 It does it with adding minutes as well and only occurs on Oct. 26, from what I can tell. What's going on here? (9 Replies)
Discussion started by: hsemune
9 Replies

7. UNIX for Advanced & Expert Users

Regarding question for GNU date

Hello All, Greetings all !! I have a query here, following are the points on same(Adding today's is 31st August 2016 for future reference). 1st Scenario: So while doing some work on GNU date, I wanted to check what was the month(in numbers) by GNU date so I have done following. date... (2 Replies)
Discussion started by: RavinderSingh13
2 Replies

8. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
Date::Manip::Migration5to6(3pm) 			User Contributed Perl Documentation			   Date::Manip::Migration5to6(3pm)

NAME
Date::Manip::Migration5to6 - how to upgrade from 5.xx to 6.00 SYNOPSIS
When upgrading from Date::Manip 5.xx to 6.00, a few changes may be necessary to your scripts. The Date::Manip::Changes5to6 document lists in more detail the ways in which Date::Manip changed, but very few of these actually entail changes to your script. It should be noted that once the changes are made to your script, it will no longer run correctly in 5.xx. NECESSARY AND SUGGESTED CHANGES
The following changes are necessary, or strongly suggested: Reading config files with Date_Init If you use Date_Init to read any config files (if you do business mode calculations, you probably do), you should remove all of the following config variables from your call to Date_Init: GlobalCnf=FILE PersonalCnf=FILE PathSep=* IgnoreGlobalCnf=* PersonalCnfPath=* and replace them with: ConfigFile=FILE where FILE is now the full path to a config file. Also, the ConfigFile argument should be the first argument in Date_Init. Date_ConvTZ The Date_ConvTZ function has changed. It should now take 3 arguments: $date = Date_ConvTZ($date,$from,$to); If $from is not given, it defaults to the local time zone. If $to is not given, it defaults to the local time zone. The date is converted from the $from time zone into the $to time zone. Both should be any time zone (or alias) supported by Date::Manip. The old $errlevel argument is no longer handled. ConvTZ and TZ config variables If you use either the ConvTZ or TZ config variables, you should replace them with either SetDate or ForceDate. See the Date::Manip::Config document for information. The TZ variable will continue to work until Dec 2013 at which point it will be removed. Other deprecated config variables The following config variables have been deprecated, but will continue to function (though they will be removed at a future date): IntCharSet (removed Oct 2012) TZ (removed Dec 2013) The following variables have been removed. If you use any of them, you may need to modify your scripts: GlobalCnf PersonalCnf PathSep IgnoreGlobalCnf PersonalCnfPath ConvTZ Internal TodayIsMidnight DeltaSigns UpdateCurrTZ ResetWorkdDay today, yesterday, tomorrow If you parse the strings "today", "yesterday", or "tomorrow" in order to get the time now, or 24 hours in the past/future, this will no longer work. These strings now refer strictly to the date (so "today" is the current day at midnight, "yesterday" is the previous day at midnight, etc.). To get the time now, 24 hours ago, or 24 hours in the future, you would need to parse the strings "now", "-24:00:00", or "+24:00:00" respectively. Do not use Memoize In 5.xx, it was documented that you could use the module Memoize to speed up Date::Manip, especially when sorting dates. This information is no longer accurate. Using Memoize in conjunction with Date::Manip should have little impact on performance, and may lead to incorrect results, especially if you change config variables. Please see the Date::Manip::Changes5to6 (GENERAL CHANGES) document for more information. If you find other instances where it is necessary to modify your script, please email me so that I can add that information to this document. BUGS AND QUESTIONS
Please refer to the Date::Manip::Problems documentation for information on submitting bug reports or questions to the author. SEE ALSO
Date::Manip - main module documentation LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Sullivan Beck (sbeck@cpan.org) perl v5.14.2 2012-06-02 Date::Manip::Migration5to6(3pm)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy