10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Hello, so basically i have a txt file containing "foto's" named YYYY-MM-DD_HH.mm.ss.jpeg.
But since it can probably not convert it it changes the date to the current date. What am i doing wrong?
#!/bin/bash
inputDateFmt()
{
sed -e 's/_/ /g' -e 's/\./:/g' <<< "$1"
}
begindatum=$(date... (3 Replies)
Discussion started by: Rovester
3 Replies
3. SCO
Hi! All,
I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330.
The system gives me an error invalid option.
This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)
Discussion started by: trolley
6 Replies
4. Shell Programming and Scripting
DST started on Oct 20th in Brazil.
If I run the below command in that time zone,
date +%s -d "10/20/2013" it throws an error message "Invalid date" . But it works fine for other dates including 19th and 21st Oct.
Any idea ? Is there any unix patch ? (2 Replies)
Discussion started by: Lakshmikumari
2 Replies
5. Programming
Hi,
Am trying to get a normalized date value irrespective of the time zone of the machine in which following code is run.
When the following code is run in 2 different machines with TZ=UTC and TZ=PDT, I get 2 different values.
I simply want to normalize the output that is specific to a... (3 Replies)
Discussion started by: matrixmadhan
3 Replies
6. Shell Programming and Scripting
Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012
all the following conditions must return an error:
*input of string
*day is > 31 or < 1
*month is > 12 or < 1
*year is < 2013
suppose the date format is stored... (1 Reply)
Discussion started by: angilulu
1 Replies
7. Red Hat
Guys,
Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session.
I am using RHEL 5.3.
root@]# ll
total 1740... (2 Replies)
Discussion started by: shtobias
2 Replies
8. Shell Programming and Scripting
Can somone take a look at this script for me - I'm trying to get it to exit if the format of dateToLookFor is not in the format YYYYMMDD:
function search
{
cd $logsloc
echo "Enter date in format YYYYMMDD (enter to exit):"
read dateToLookFor
echo $dateToLookFor | grep -q ... (2 Replies)
Discussion started by: rich@ardz
2 Replies
9. Shell Programming and Scripting
i've looked at a bunch of the date comparison threads on these boards but unfortunately not been able to figure this thing out yet. still confused by some of the way conditionals handle variables...
here is what i where i am now...
# a bunch of initializition steps are here ...... (1 Reply)
Discussion started by: danpaluska
1 Replies
10. Shell Programming and Scripting
Hi All,
I am getting two input from User for Date from the command prompt when
my script is executed .
The date format i am taking is : DD-MM-YYYY
so is there any method in Unix to validate the two input date.
There might be many cases for these two date to be invalid.... (1 Reply)
Discussion started by: rawatds
1 Replies