The tag has no usage guidance.

learn more… | top users | synonyms

-2
votes
0answers
24 views

how to set date from the main centos server to all remote server using bash scripts

h! Actually i want to set date from the main centos server to all remote servers simultaneously and no any date on remote server might be different with the help of bash script. In short getting ...
-2
votes
1answer
122 views

Setting the system date to a day in the past on Windows 2012

I have an business application that uses the system date for all of it's date processing. We need to be able to fix the date to a particular date, and at midnight, reset the date back to this fixed ...
-2
votes
1answer
34 views

Add date using echo without calculating [closed]

I should add the line to /var/spool/cron/crontabs/root on my ESXi: /bin/echo "0 3 * * 6 /ghettoVCB-master/ghettoVCB.sh -g /ghettoVCB-master/text.conf -f /ghettoVCB-master/text.list > ...
-4
votes
2answers
43 views

execute bash script on last thursday of every month [closed]

Actually i have a bash script file and i want to execute it on the last thursday of every month please help me to find out the proper solution of that problem using bash scripting.
0
votes
0answers
21 views

Linux screen(or java) with different date of system

I having a problem with screen on Centos 7. The system time is correct but on screen application theres a diference of 3 hours. The system output(correct): [root@Server ~]# date Ter Fev 23 01:27:11 ...
5
votes
4answers
6k 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
1answer
20 views

Portwell motherboard: Boot-time fsck finds “unexpected inconsistency” due to system time

Although this question involves an embedded motherboard, serverfault seemed to me the best stackexchange forum to post to. My colleagues and I have been investigating this weird Linux boot problem ...
0
votes
2answers
26 views

logrotate issue with date appending

I have an Apache server (2.2) running in RHEL 6.3, with the following logrotate configuration: # Rule for Apache logs /var/opt/apache/logs/*log { compress missingok notifempty daily ...
1
vote
2answers
65 views

System clock always resyncs after setting it

I'm setting the system clock using the following command: date -s "31 DEC 2015 12:00:00" Immediately after executing I run just date and see that the date and time is December 31 2015. Then, after ...
4
votes
1answer
93 views

date command displays different time

I have one centos 5.8 Linux server. I am experiencing a bit strange issue and figured out it is something with system time. When I check date command, outputs are really strange. Here is example: ...
1
vote
1answer
334 views

ansible manipulate file with a date format

In ansible, I would like to manipulate files/directories/archive that are composed or to composed like this: How would I do that. It seem Ansible is not able to handler that. (I doubt). So, what I do ...
4
votes
4answers
3k views

Why is my “Last log on” date wrong?

I'm sitting here across the office from Bob, who is logged into the domain right now, working away. I pull up AD Admin Center and take a look at Bob's account and it tells me his last log on date is ...
6
votes
3answers
11k 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?
1
vote
0answers
42 views

/proc/stat btime value change after boot

In a Linux server with the kernel 3.16, not virtualized, but with the ntp daemon active, the variable "btime" wich gives the time at which the system booted, change a few seconds before booting. For ...
1
vote
1answer
70 views

Solaris + date + what is the same equivalent for Solaris

on Linux the syntax for date with seconds is: date +%s 1438587288 from MAN PAGE - %s seconds since 1970-01-01 00:00:00 UTC what is the same equivalent for Solaris?
2
votes
5answers
19k views

How to create a yesterday date in a batch

copy \\server01\E$\LogFiles\IVR\bcR\??120428.* \\LBC\workgroup\cs\ftp\Team\bcR\ copy \\server02\E$\LogFiles\IVR\bcR\??120428.* \\LBC\workgroup\cs\ftp\Team\bcR\ copy ...
15
votes
4answers
10k views

Docker Container time & timezone (will not reflect changes)

Where do Docker containers get their time information? I've created some containers from the basic ubuntu:trusty image, and when I run it and request 'date', I get UTC time. For awhile I got around ...
1
vote
0answers
226 views

How to start tomcat with faketime within a docker container?

I use docker to deploy a Java web application in tomcat. For testing purposes, I want to force the system date to a specific value. With Docker it is not possible to change the container date without ...
0
votes
1answer
92 views

How exactly date/time works in MySQL with timezones?

My understanding was: everything is UTC internally dates are displayed in @@session.time_zone timezone for current session if I do INSERT with +02:00 TZ set and insert 2015-05-15 10:54 it is parsed ...
3
votes
14answers
50k views

Finding day of week in batch file? (Windows Server 2008)

I have a process I run from a batch file, and i only want to run it on a certain day of the week. Is it possible to get the day of week? All the example I found, somehow rely on "date /t" to return ...
1
vote
1answer
107 views

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 ...
1
vote
2answers
2k views

SFTP files not showing upload date as last modification time

Some of the files we receive on our Redhat server are showing date different from upload date as the last modification time. For us the modification time is important as we classify files depending on ...
2
votes
2answers
1k views

bash: convert date from to unix timestamp changes timestamp

Running the following command at the xen-servers (either DOM0 or DOMU) at $company gives me a negativ number, on every other system zero (0) (even in my cygwin). date -d "1970-01-01T00:00:00" "+%s" ...
0
votes
1answer
105 views

Will changing the date or time on windows server 2008 break any websites or anything else?

Sorry if this is a newb question, but I was told by someone about a month ago that if I change the date and/or time on one of our servers it could break our websites or something. I can't fully ...
6
votes
1answer
1k 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
0answers
212 views

Syslog randomly logs bad time [duplicate]

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

Ubuntu server time jumping away

I wanted to write "drifting away" in the header but this is not what's happening. I have an Ubuntu 12.04 LTS server running some web apps. On 25.10.2014 I updated tzdata to the latest version and ...
-2
votes
3answers
119 views

crontab job is setting date wrongly [duplicate]

I need to set date and time in my server in order to make them synced always. I cannot use ntp inside my channel due to proxy issues. I've found this workaround. It works fine when I run it in command ...
0
votes
0answers
495 views

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

Why is there a difference with Unix date between 2 and 3 months

How is this possible and how do I deal with it? I'm making backup script that is dependent on Unix date and have discovered an interesting bug: [root@web000c zfs_test]# date +%y-%m-%d --date='2 ...
0
votes
1answer
94 views

Binding timestamp value to a variable in crontab

I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far. php = ...
1
vote
4answers
958 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
1answer
76 views

bash date not using the set timezone

I have export TZ="/usr/share/zoneinfo/Europe/London" in my .bashrc file, but the following output the time in UTC (GMT) export TM=`date +%H%M%S` export DTTM="`date +%a\ %F\ %T\ %Z`"
-2
votes
1answer
267 views

Set Debian Wheezy date to UTC [closed]

I'm not an expert in Linux servers, and I'd like to configure my server to use the UTC timezone, so there's no issue between the applications running on it. I don't really know how to do this. I ntp ...
0
votes
1answer
108 views

DBVis SQL Query - Using Date Variables

Firstly it's been a very long time since I did any SQL and even then it wasn't at a high level. I have created a SQL query which works but I want it so the date range changes automatically, for ...
-2
votes
1answer
45 views

Ubuntu shell: Get tomorrow's weekday [closed]

I have a shell script for backups and I need the Weekday of tomorrow. $Today = $(date +%a) #$Tomorrow = ?
1
vote
1answer
491 views

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

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 ...
1
vote
1answer
50 views

How to generate a signature with a launchd plist? [closed]

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, ...
1
vote
1answer
1k views

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 ...
1
vote
2answers
1k 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. ...
0
votes
2answers
2k 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 ...
1
vote
0answers
491 views

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 ...
6
votes
2answers
18k 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 ...
9
votes
1answer
6k views

How do I make cron run every other Sunday on the OTHER Sunday?

I have a cron job that runs at 0 0 * * 0/2 -- i.e. every other Sunday. It just ran now, for instance. However, I want it to run on the other Sundays -- next Sunday, rather than this one. Another ...
2
votes
1answer
423 views

Linux date translation to different time zone

The Linux server is hosted in EST timezone. But I want to translate the output of date command to IST(Indian Standard time +5:30 hrs) format and use it in a shell script. Is there any option available ...
1
vote
2answers
949 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 ...
4
votes
5answers
7k views

ntpdate not updating system time in XenServer VM

We have a Debian webserver that I am trying to use ntpdate to keep the time in sync. When I run ntpdate ntp0.cs.mu.oz.au I receive 16 Sep 10:55:36 ntpdate[21626]: step time server 128.250.36.2 ...
0
votes
1answer
277 views

Debian date jumping, causing complete lockup

I have a Debian Squeeze VM that has suddenly chosen to jump it's date forwards just over a month, which seems to confuse it no end and cause it to require a hard reset (yikes!). There is nothing ...
0
votes
1answer
500 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 ...