Questions tagged [date]
154 questions
0
votes
1 answer
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 BRT 2016
And the screen outputs running a java…

FabioZumbi12
- 1
- 1
0
votes
2 answers
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
rotate 15
create 0640 www_adm apache
…

Peter
- 123
- 2
- 5
0
votes
1 answer
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 and stored as 2015-05-15 08:54 UTC.
when I change…

Tomáš Fejfar
- 147
- 1
- 9
0
votes
1 answer
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 remember who told me or what they actually said... but…

Jason Herz
- 3
- 1
0
votes
1 answer
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 yesterday - 30.10.2014 - strange things began to…

svz
- 101
- 1
0
votes
1 answer
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 = '/usr/bin/php'
dir = '/var/www/bkd'
logs =…

mk_89
- 125
- 1
- 2
- 8
0
votes
1 answer
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`"

jezmck
- 111
- 3
0
votes
1 answer
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 example to run for the previous month. I have…
0
votes
1 answer
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).
#!/bin/bash
while read line; do
case "$line"…

Ben L.
- 3
- 3
0
votes
2 answers
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-style=+%Y%m%d /etc/hosts | awk '{print $6}'
…

yael
- 2,433
- 5
- 31
- 43
0
votes
1 answer
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 unusual in the logs, except that the datestamp…

artfulrobot
- 2,949
- 13
- 36
- 60
0
votes
2 answers
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
146.92.25.5 burgerking
146.92.25.6 chowking
The…

rumz
- 225
- 1
- 4
- 13
0
votes
1 answer
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 mv the files to a new file name that puts the UTC…

egorgry
- 2,871
- 2
- 23
- 21
0
votes
1 answer
Sanitizing dates using sed or awk on an ldapsearch query
I'd like to pipe the output of an ldapsearch to sanitize the dates returned - I presume sed and/or awk can help with this but would appreciate a bit of help.
The fixed length date format in the LDIF output file is like this:
whenCreated:…

Linker3000
- 668
- 1
- 5
- 14
0
votes
2 answers
search and print specific date in a log file
I'm working with a log file and I want to print from a specific day till the end of it .
that specific date is ($sd=27/Dec/2002) for example. now I want to search for this day and print from it till the end of log file ! but what if 27/Dec is not…

matarsak
- 37
- 5