1
vote
2answers
96 views

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. ...
2
votes
2answers
3k views

date: cannot set date: Operation not permitted [duplicate]

I have received an interesting problem during I tried to set my Server time either with NTD or manually using date command. First of all I have tried to use NTD. I have succesfully installed the ...
0
votes
2answers
196 views

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 ...
0
votes
1answer
188 views

replace dates in XML file on a Linux server

I'd like to change the date format in the contents of an XML file from 2013-01-21 to January 21 The following script works on my mac, but not on a linux server (I'll be running it as a daily cron ...
-4
votes
1answer
108 views

linux + change/edit file without effecting on file date [closed]

I want to edit some file in my linux for example ls -ltr /etc/some_file -rw-r--r-- 1 root root 188 Jul 1 2010 sysstat . echo "Server101_IP=187.0.98.4" >> /etc/some_file . I ...
0
votes
2answers
747 views

linux\solaris + print specific date format from file

subject - print file date on solaris as format: yymmdd ( yy - year , mm - month , dd - day ) on Linux machine I type the following command in order to get: file date as the following: ls -l ...
0
votes
2answers
53 views

Is there a way to set the date on a server from the date from another server?

Someone asked me to update the times on 4 servers that are not connected to the internet and they have no ntp server. e.g /etc/hosts 146.92.25.3 jollibee 146.92.25.4 mcdonalds ...
2
votes
4answers
1k views

How to determine number of week of the month

On the Linux CLI, is there a way to get the number of the week of the month? Maybe there is another way to get this with one simple (like date) command? Let's say that day 1 to 7 is the first week, ...
1
vote
3answers
1k views

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 ...
0
votes
0answers
499 views

Member Status: Inquorate in RHEL 5.6

I've encountered a strange issue. I had to change the time on my Linux RHEL cluster system. I've done it using the following command from the root user: date +%T -s "10:13:13" After doing this, ...
0
votes
1answer
177 views

setting logrotate to use UTC time

Is it possible to force logrotate to use UTC time for one configuration? I need the dateext to be set to UTC. I was hoping it was as simple as setting a date varible. Should I just run postrotate and ...
5
votes
2answers
191 views

date +%s glitches

I have a strange issue I'm starting to troubleshoot and wondered if anyone would have any helpful tips. I have a cronjob executed every minute that executes a script and appends the output to a file ...
4
votes
5answers
300 views

User creation on Linux Redhat

Is there anyway one can determine when a user was created on Linux? I know of a couple of things one can do,but it's an unreliable way of doing it. The first option is checking when the home directory ...
6
votes
1answer
813 views

Time too quick in debian, 72 minutes pass in system date in one real world second

Having trouble with system date/time in GNU/Linux/Debian: Time goes too fast for date, time, cron. The sleep command works fine, file modification times are correct. The issue explained via commands: ...
1
vote
4answers
823 views

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 ...
0
votes
3answers
401 views

cron clock problem

I have noticed on my RHEL 5.5 that cron daily starts an hour later (at 1AM instead of midnight). System and hardware clock are the same. How can i set it so it will start at midnight? date [root@a ...
0
votes
2answers
71 views

System Date and httpd/mysqld

Hi when i change the date: date -s "01 Jan 2011 01:30:15" Do services such as mysqld and httpd need to be restarted for thier date to update? or is there a better way to handle these services date ...
3
votes
2answers
3k views

Calculate Days Since 1/1/1970

How can you calculate the number of days since 1/1/1970? This is for updating the shadowLastChange attribute on OpenLDAP. Is there a way to do this using the linux date command?
3
votes
2answers
433 views

Question on date and timezone in Linux

I did the date command and it gave the following output root@localhost:~$ date Thu Dec 30 14:19:47 UTC 2010 Then i modified the date using date -s command whichn gave the following output ...
0
votes
2answers
279 views

Named pipe with shell command date

I want to let a standard user change the system date. So I created a named pipe. The standard user write a date to the named pipe and a root process listens to it and sets the date accordingly: ...
2
votes
2answers
821 views

Bash scripting: detect first day of month

I wrote three bash files: incremental_backup full_backup execution Now I want another bash script do the following : if (date is the start of month 1/-/----) then invoke `full_back_up` ...
0
votes
3answers
86 views

Server Time Jumped Ahead 7 Months

CentOS 5.x My CentOS server appears to have jumped ahead 7 months. I'm not sure how or why. Are there any logs in CentOS that could provide more insight here? Unfortunately, ntpd was not running. ...
2
votes
3answers
182 views

Changing linux date with current time

I am running sudo date +%m/%d/%Y -s 7/14/2010 command to change date. It changes fine except I want it to pick up the current time as well, and not start the time from 00:00:00 on 7/14/2010.
0
votes
1answer
61 views

Incorrect file creation/modication time in linux

In our server we get files uploaded daily by customers via FTP. However sometime the the time stamp of these appear incorrect even though the server time is correct. I got a file with time stamp Jun ...
5
votes
1answer
540 views

Is it possible to set the date on a Linux machine to the year 2040?

I need to be able to set the date on Ubuntu (8.04.4 LTS) to the year 2040 (to test something that isn't relevant to this question). Is that possible? I can run: $ sudo date -s "15 JAN 2038 ...
1
vote
4answers
148 views

One Linux server has two timer

The time on one of our Linux box is very weird. Whenever I call date 3 times, the 4th call will give a wrong time(usually 1 hour later). I have setup cron to sync with ntp server. We have 20+ similar ...
2
votes
1answer
777 views

Set up a permanent system date

I need to set up a permanent system date in a Linux test server for time-sensitive software which needs this time loop (Groundhog day's style) or bending time (Hiro's ones), you name it. I tried it ...