Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [date]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
53 views

Centos 7 - I can't fix the datetime

It's NOT a VM. Physical server. Centos 7 I have tried to fix the time with: date -s "04/03/2022 01:06:31" or timedatectl set-time 01:06:31 But it is impossible, it shows always 8 hours ...
user avatar
0 votes
1 answer
249 views

Can't put correct date & time on LXC container with ubuntu

I'm tryig to put correct date and time, on Proxmox LXC container with ubuntu but I can't. There are some info of my server. ➜ ~ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.1 LTS (...
user avatar
0 votes
1 answer
26 views

SQL Converting strings to date [closed]

this has really baffled me for a few days and am seeking help. I am using SQL Server 2017. I am trying to handle strings from a free format field and either convert them to a date in the format of &...
user avatar
0 votes
1 answer
83 views

I need to rename a file and insert a date

I'm trying to set a daily process to locate a file, rename it and insert the previous date in the file name. I want the file to be named "Filename_MMddyyyy.csv" with MMddyyyy being the ...
user avatar
0 votes
0 answers
57 views

Move files older than day

I am looking for some solution, where I have to move all the directories and files under the source directory to the destination a day before. I want to move the directories till yesterday but not ...
user avatar
  • 1
0 votes
1 answer
1k views

PowerShell: How to check a recurrent week time interval?

I need to create a PowerShell script, able to collect some data at each minute. However, this script cannot run during the "technical windows", that are scheduled to occur at the same week ...
user avatar
0 votes
1 answer
52 views

Linux DST - 25.10.2020 - change did not occur - old linux bug?

we have a strange problem on older linux kernel embedded devices that still uses /etc/tz and $TZ for setting the timezone and dst Our TZ variable has value: 'MET-1MEDT,M3.5.0,M10.5.0/03:00 And ...
user avatar
  • 115
1 vote
1 answer
951 views

Docker container with random date

I was running a container based on the image linuxserver/radarr:3.0.0.3095-ls12. Once I updated the tag/version to linuxserver/radarr:3.0.0.3807-ls24 the application stopped working. After debugging a ...
user avatar
0 votes
2 answers
47 views

How to name a folder with today's date and time?

So i have this lil .bat setup @ECHO OFF echo %date% Copy D:\000Back\list.txt D:\111Back\ CD D:\111Back\ copy list.txt %date%_%time%.txt ECHO done PAUSE The second copy command never goes through, ...
user avatar
  • 1
0 votes
1 answer
2k views

Redhat Enterprise Linux 7: How to disable DST - Daylight Saving Time

We have 16 Linux RHEL 7.5 servers in a cluster and servers are sync with crony service to NTP server We have two questions How to know if DST is configured on our servers? How to disable the DST on ...
user avatar
5 votes
2 answers
2k views

Linux get UTC offset from current (or other) timezones on given date and time

In Chile the case is very particular as the days of daylight saving changes are different a year from another... Is there a function to get for given day at given UTC time the UTC offset? I saw on ...
user avatar
7 votes
1 answer
3k views

Alpine Linux timezone doesn't stick if tzdata is removed

This used to work to set the timezone. I have a container on Alpine 3.9.4 where it worked: RUN apk add --no-cache tzdata ENV TZ America/Chicago RUN apk del tzdata I'm now creating a Docker container ...
user avatar
  • 171
6 votes
2 answers
525 views

CentOS not considering daylight saving on timezone

In Brazil, this year, the president decided we should not have daylight saving. And because of that my Centos 8 server is with the time wrong, I mean, when I use date the time shown is wrong by 1 hour....
user avatar
  • 278
3 votes
1 answer
3k views

jq sort by date (iso 8601)

I try to sort json by date (field CreationTimeUTC) in iso 8601 format with jq 1.5. I found this post, but that return : 'Cannot index boolean with string "CreationTimeUTC"' jq '.Entities....
user avatar
0 votes
1 answer
133 views

Convert date and time from output

I have a file with date and time on a couple thousand lines. I need to convert: 2019/08/02-01:23:50+0000 To: 02/Aug/2019-01:23:50 +0000 I so far have th=`grep ...
user avatar
32 votes
1 answer
4k views

Why is the year in this ISO timestamp not 2019?

For a simple app I'm using to test a devops pipeline I'm outputting the start time of a build to the homepage. On my development machine the year of the ISO-8601 timestamp I expect, 2019, is printed (...
user avatar
  • 443
0 votes
1 answer
80 views

Convert date format in file

I have a file with the current date format 11.22.33.44 - - [2019/08/02-01:23:50+0000] GET www. 1111:2222:3333:4444:5555:6666:7777:8888 - - [2019/08/02-01:28:18+0000] GET www. And i need to convert ...
user avatar
0 votes
0 answers
88 views

ntp + ntp loose synchronize each time in 5:00 morning

we have a very strange behavior we have 12 Linux redhat machines - redhat 7.x two of these VM servers are loosing the time synchronize each day at 5:00 in the morning after we restart the chronyd , ...
user avatar
  • 451
0 votes
1 answer
75 views

date command with formatter string is not executed in cron under Linux [duplicate]

I have the following crontab: # m h dom mon dow command * * * * * /bin/date >> /tmp/date.log 2>&1 * * * * * /bin/date "+%F_%H-%M-%S" >> /tmp/date2.log 2&...
user avatar
  • 121
2 votes
1 answer
1k views

Set date format in nginx autoindex HTML listing

The default date format in nginx autoindex HTML directory listings is 19-Jun-2019. Can I change it to ISO YYYY-MM-DD format instead?
user avatar
  • 455
0 votes
2 answers
157 views

Linux Script to Solaris

Hellooo! I have the following sentence, that works on Linux, but not in Solaris Version. YEAR=2019 echo $(expr '(' $(date -d $YEAR/9/30 +%s) - $(date +%s) + 86399 ')' / 86400) " days until deadline" ...
user avatar
  • 11
0 votes
1 answer
171 views

Count down date time shell script [closed]

i have 3 parameters of date "Sep 30 Mon" (Month,DayNumber,Day), and i want to make a shell script that shows the quantity of days left to reach to Sep 30 Mon. How can i do it?
user avatar
  • 11
7 votes
1 answer
212 views

Ubuntu 18.04 strange behaviour of date with --date option

I've found strange behaviour of date program in Ubuntu 18.04. So, I consider date should work with --date option and correctly process +N minutes: date --date "2019-01-01 13:43:32 +1 minutes" "+%Y-%...
user avatar
0 votes
1 answer
32 views

Query Network Client Date

Question: Is there a way to ping or query the date of a client linux computer for the purpose of verifying time synchronization? Setup: I have two computers on a network. One linux machine (machine A)...
user avatar
2 votes
1 answer
3k views

filtering event logs with specific TIME range of ANY day

How can I query windows server events between two times of any day? I have tried with PowerShell... Get-EventLog -Logname xxxx -After 04:00:00 -Before 04:00:30 ...but just returns today's events
user avatar
  • 23
1 vote
0 answers
415 views

Journalctl seems to be ignoring since and until

I'm trying to get the logs of a problem that's been happening for over a week by this point. I'm trying to use journalctl to print the logs but it doesn't seem to give me anything more or less than ...
user avatar
  • 165
0 votes
3 answers
471 views

Properly setting date on Linux machines

I am trying to set the system date on my linux machine. If it matters, it is an Amazon EC2 machine that I provisioned. I tried to set the date with this command: sudo date -s "19 APR 2018 11:14:00"; ...
user avatar
0 votes
3 answers
3k views

How do I change the date in Google Cloud Container-Optimized OS?

I try to set date: sudo date -s "28 OCT 2018 15:00:00" but before I need to disable NTP timedatectl set-ntp false Google Cloud Container-Optimized OS doesn't have timedatectl util -bash: ...
user avatar
0 votes
2 answers
417 views

Fail to set EEST timezone

I have a server which is set to EEST timezone (East European Summer Time). I'm trying to configure another server to this timezone, but I fail to find appropriate timezone in /usr/share/zoneinfo Any ...
user avatar
  • 128
1 vote
1 answer
4k views

Trying to set date time within ubuntu based docker container

Within my docker container I run: root@77defb7a21e5:/# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.9 (jessie) Release: 8.9 Codename: ...
user avatar
0 votes
1 answer
1k views

SCCM WQL Query Structure BIOS release date

So with this whole Meltdown and Spectre causing a huge fuss world wide. I have discovered a solution to mass deploy BIOS updates. The one thing is when checking compliance I am unable to locate ...
user avatar
  • 15
0 votes
0 answers
29 views

Different format of date is valid in query string on different VMs with the same regional settings

I deployed .NET application hosted on IIS on two different VMs with Windows Server 2016 on them, the code is exactly the same. However on one machine the date in query string 30/01/2018 is parsed ...
user avatar
  • 191
1 vote
2 answers
362 views

Windows: how to set a date and time before logon?

Complete newbie to powershell and scripting, here. I have figured out how to set date and time through powershell using the set-date cmdlet. However, I can't figure out how to execute the script ...
user avatar
  • 189
0 votes
0 answers
129 views

Cron with dynamic date on parameter not executing [duplicate]

I have the following command that works well when I execute it manually : sendreport --date_start=`date +%Y-%m-19 -d "-1 month"` --date_end=`date +%Y-%m-19` --to=myemail@mydomain.ch My problem is ...
user avatar
-5 votes
1 answer
62 views

"date" returning a month as a 3-char word [closed]

At the moment I call date this way: date '+%Y %m %d' # ==> 2017 12 01 How should I adjust it so that it return a month in the 3-char format? Like this: date '+%Y %m %d' # ==> 2017 dec ...
user avatar
  • 69
1 vote
1 answer
980 views

Bash scripting: Get the week of month by referencing the Monday of that week

I'd like to be able to retrieve the number of the Monday of the current week using a bash script in Ubuntu Linux. Example and info: This past Monday (Oct 30th) was the fifth Monday in October, and ...
user avatar
0 votes
1 answer
767 views

Wrong date on mails when searching on iPhone after Exchange migration

After a colleague of mine migrated Exchange for a customer from Exchange on a small business server to Exchange 2016 the dates are messed up when searching. When a user just browses his or her email ...
user avatar
  • 31
1 vote
3 answers
8k views

Date field is being presented as integer

I have an Elastic Stack server (on Hyper-v) that is ingesting data via a logstash exec command and performing analytics on it. Everything is working great except a date field that is being displayed ...
user avatar
-2 votes
3 answers
2k views

Incorrect Ubuntu server time [closed]

I use 14.04.1-Ubuntu. When execute date in command line, I get time which about 1 min different comparing Greenwich Mean Time or other source. I synchronized it using sudo ntpdate -s time.nist.gov few ...
user avatar
  • 201
0 votes
2 answers
641 views

rsync logfile starts to include litteral date format in path

I created a backup-shell that runs as a cron job. That's not new.... But in the command line I have the logfilename specified with a date format. All is ok, until it reaches the folder where the ...
user avatar
0 votes
1 answer
615 views

Add Calendar Option to Jasper Report

I spun up a Jasper Reports server (version 6.3) and I'm migrating reports from our old server (5.0.0). Some of the reports in the old instance have options for date ranges. In the 5.0.0 instance users ...
user avatar
  • 578
0 votes
1 answer
227 views

'date' on SLES 12 SP2 instantly reset

I'm attempting to test my system monitoring by temporarily disabling NTP and using "date -s '5 minutes ago'" to change time enough to trigger my alerts. This test works fine on SLES 11 and SLES 12 SP1....
user avatar
2 votes
1 answer
611 views

Centos 6 Timezone Wrong

I am trying to set my Centos 6 VPS to GMT timezone. I tried a sudo ln -s /usr/share/zoneinfo/GMT /etc/localtime Which works fine. However when I run date it returns: Tue Oct 4 05:09:32 GMT 2016 ...
user avatar
  • 199
0 votes
1 answer
3k views

Date format conversion to epoch using gawk ( awk )

I want to convert dates in a file to epoch time. A sample csv looks like this: $ cat test.jtl 2016/09/19 00:31:17.080,238,test1 2016/09/19 00:31:17.154,322,test2 22-Sep-2014 10:32:35.012,222,...
user avatar
1 vote
2 answers
20k views

Change date on a computer that is attached to a domain

Is it possible to change the date of a computer that is attached to a domain and have it stick? I've researched this for a few days and haven't found anything confirming or denying that this is ...
user avatar
  • 35
-2 votes
2 answers
1k views

date +"%s" returning empty string [closed]

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

How to configure hwclock to UTC on Redhat Linux?

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 ...
user avatar
  • 1,001
8 votes
2 answers
6k 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/...
user avatar
  • 1,001
1 vote
1 answer
1k 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 +%...
user avatar
0 votes
1 answer
1k 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", ...
user avatar