Questions tagged [date]
154 questions
1
vote
1 answer
Why my date command changed and how to restore the default one?
I'm having a problem in a RHEL 5.3 after I tried installing Perl Power Tools. Everything was working fine until I tried installing that package by hand (the server has no access to internet).
At first every shell script that used awk was giving…

Nocturn
- 133
- 1
- 10
1
vote
0 answers
Syslog randomly logs bad time
Try as I might, I can't figure out why this server randomly timestamps syslog entries with bad time.
Here's a 5-minute stretch of syslog from a few minutes ago. You'll notice there are two places where the time is logged wrong. Once where it logs…

Aaron C. de Bruyn
- 588
- 10
- 30
1
vote
0 answers
Graylog2 date extractor from tab-delimited file
I have a tab-delimited logs with such messages:
2014-06-01 00:00:56 192.168.1.1 968 http://yandex.ru
I can extract date and time with regexp (\d{4}-\d{2}-\d{2}\s*\d{2}:\d{2}:\d{2}) but when I try to convert it to timestamp with pattern…

Michael
- 43
- 1
- 2
- 5
1
vote
1 answer
How to set up date/time on DGS-1500?
I have numerous D-Link DGS-1500-28 switches with firmware 1.00.013, 1.10.005 and 2.10.002 on it, and there are no visible option to set up date/time via web- or telnet-interface.
Device uses date/time in logs, but there is no idea, where it obtains…

AntonioK
- 581
- 2
- 9
- 25
1
vote
1 answer
How to generate a signature with a launchd plist?
Is it possible to implement the following shell script completely as a launchd plist to generate a signature with timestamp in the StandardErrorPath / StandardErrorPath files?
#!/bin/sh
echo "Hi, your FOO.plist was here at $(date)"
This one doesn't…

user3077223
- 13
- 2
1
vote
2 answers
Server timezone changed to PHT but logs still written in MST?
A couple of days ago, I updated the timezone on an Ubuntu 12.04 LTS server using $ sudo dpkg-reconfigure tzdata.
Today I noticed while tailing the mail log, that the times were still 15 hours behind. I immediately checked the server date but it's…

Peter White
- 586
- 1
- 7
- 17
1
vote
1 answer
Ubuntu 12, cannot change date and time
whenever I try to set the date from either the command line, or using the Settings window, the new value is always reverted after a few seconds.
I have tried many things: e.g.
date 062120002013.00
This gives me the future date I want of Fri Jun 21…

user178127
- 11
- 3
1
vote
0 answers
Update clock on virtualbox virtual machine with cent os from host
I have a virtual machine, with cent os installed, and everytime I sleep the host computer, the clock of the VM goes out of sync. I would like it to pick up the current time from virtualbox - which I would expect it to do naturally.
How can I force…

Billy Moon
- 1,437
- 3
- 17
- 23
1
vote
2 answers
ntpdate wrong date
Hi all I have an ubuntu8 server where I have problems with date.
My current date (Europe/Rome) is 9:35
If I do date print me 11:12:34
I have seen my ntp.conf is:
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server…

Alessandro Minoccheri
- 185
- 1
- 5
- 16
1
vote
2 answers
How to use date functions for linux batch specile?
First, I wasn't sure if belonged to StackOverflow or here, but figure this would be more applicable to server administration.
We have a .tar backup file going to an offsite backup server each day as apart of our daily processing. These are…

Chad Harrison
- 6,990
- 10
- 29
- 41
1
vote
1 answer
Apache RewriteCond: inject string into URI between regex match groups
EDIT
This works, needed to use % in place of $ for capture groups:
RewriteRule (.*) http://localhost:8081/%1/%{TIME_YEAR}1101%2 [P]
Having a hard time sorting this out.
Need a date string conditionally injected into specific URIs (for proxy to…

virtualeyes
- 675
- 3
- 12
- 28
1
vote
3 answers
Linux Centos 6.2 "hangs" until date is synchronized
I'm having a problem that i cannot understand why or how to solve it.
I have a Centos 6.2 server, that's my secondary DNS (bind 8) and DHCP (ISC's dhcp server).
I need to maintain an accurate date because dhcp primary server complains and even stops…

Feiticeir0
- 434
- 3
- 11
1
vote
3 answers
convert epoch time to readable time foramt
I wrote a code which convert epoch time to readable time
sd=`date -d '1970-01-01 UTC '$SDATE' seconds' +"%d-%m-%Y"`
the output is : 27-12-2002 but I want the output to be : 27/Nov/2002
how should i change my code?

matarsak
- 37
- 5
1
vote
1 answer
modification time of file in future, but timezone is set correctly
Files that I am creating at a Unix server are created with a modification time that lies 5 days in future. But when I check with the date command, it seems, that timezone and date are set correctly. :
# uname -a
SunOS tmxd050a 5.10 Generic_118833-33…

Bertolt
- 297
- 3
- 10
1
vote
4 answers
cron job to remove files with specific name
I have this in my crontab
0 3 * * * mysqldump --host=10.100.100.3 --user=username --password=mypass --routines DBName | gzip > /tmp/mysqldumps/mydb.`date +"\%Y-\%m-\%d"`.gz
now I need to create another cron job to do this scenario
assuming we are…

Alaa Alomari
- 638
- 6
- 19
- 37