The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
2answers
40 views

date +“%s” returning empty string

I have a script with following lines: TIMESTAMP_END=$(date +"%s") FILE=${DIR}/recording_$TIMESTAMP_BEGIN-$TIMESTAMP_END.$EXT mv ${TMP_FILE} ${FILE} Script is running on Raspberry Pi and the ...
0
votes
0answers
36 views

Linux redhat + cant configure hwclock to UTC

I have linux redhat machine # more /etc/redhat-release Red Hat Enterprise Linux Server release 5.11 (Tikanga) I want to change the hwclock to UTC time So I perform little test as # date -u Tue ...
5
votes
2answers
191 views

Red hat Linux + TIME ZONE CONFIGURATION + details from clock file

In order to configure the Time Zone on red hat Linux machine ( version 5 and 6 ) need to configure the file: /etc/sysconfig/clock And create a symbolic link between /etc/localtime to /usr/share/...
0
votes
0answers
29 views

Linux Time Zone + why UTC TZ is set when we remove the localtime file

I have Linux RedHat version 5.1 I just want to know how the OS know to return to the default time Zone What is/are the file/s that defined the OS to use the default Time Zone - UTC for example We ...
0
votes
1answer
17 views

Timestamp comparison on AIX without date -d

I have a bash script on AIX 7 that runs a database query and the output I get is a timestamp in the following format: 201607130319 Now I would like to compare the timestamp with current time(date +%...
0
votes
1answer
24 views

which table should I query for date & time in zabbix?

i need to query date and time in zabbix server. which table exactly stores these 2 parameters? Actually there is a table named history and there are two fields in that table named "clock" and "ns", ...
0
votes
1answer
39 views

Creating a RFC 1123 compliant date for HTTP header creation on the CLI

I'm trying to create a HTTP 1/1 compliant date header using standard unix date(1) in order to post this to a RESTful server using curl or similar. Any ideas what format to pass to date(1) to get this ...
0
votes
1answer
60 views

How do I force a date/time format for traffic captured with tshark using “-T fields”?

I'm capturing traffic with tshark into a CSV file using "-T fields", but whatever I try I can't get a nice ISO date or even changing the timezone to UTC. The command I'm using is tshark.exe -i 2 -c ...
-2
votes
1answer
202 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
41 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 > /var/log/...
-4
votes
2answers
48 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
22 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 ...
1
vote
1answer
25 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
36 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
83 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 ...
1
vote
1answer
730 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 ...
1
vote
0answers
54 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
83 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?
1
vote
0answers
288 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
96 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 ...
17
votes
4answers
14k 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
1answer
111 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 ...
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
120 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 ...
4
votes
1answer
100 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
0answers
259 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
49 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
125 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
555 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 ...
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 = '/...
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
83 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
276 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 ...
-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 = ?
0
votes
1answer
117 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 ...
1
vote
1answer
583 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 date/...
1
vote
1answer
51 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
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. ...
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 062120002013....
1
vote
0answers
541 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
21k 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
7k 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
442 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
1k 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
521 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 job)...
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 ...
-4
votes
1answer
235 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
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 --time-...
0
votes
1answer
281 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 ...
1
vote
2answers
130 views

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 ...