Questions tagged [date]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
48 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 ...
0
votes
0answers
41 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 ...
0
votes
1answer
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 ...
0
votes
1answer
39 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 ...
0
votes
1answer
299 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 ...
0
votes
0answers
75 views

Setting system time to hwclock and making it stick

I have a rhel 5.11 system that I need to change the date to a time several months in the past. And also keep it synced to the hwclock not any external time source. first I disable ntpd: chkconfig ...
0
votes
2answers
35 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, ...
0
votes
1answer
781 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 ...
4
votes
2answers
604 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 ...
6
votes
0answers
1k 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 ...
6
votes
2answers
350 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....
2
votes
1answer
1k 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....
0
votes
1answer
128 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 ...
32
votes
1answer
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 (...
0
votes
1answer
66 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 ...
0
votes
0answers
85 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 , ...
0
votes
1answer
59 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&...
2
votes
1answer
823 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?
0
votes
2answers
102 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" ...
0
votes
1answer
123 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?
7
votes
1answer
146 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-%...
0
votes
1answer
26 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)...
2
votes
1answer
2k 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
1
vote
0answers
250 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 ...
0
votes
3answers
359 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"; ...
0
votes
3answers
2k 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: ...
0
votes
2answers
262 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 ...
1
vote
1answer
3k 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: ...
0
votes
1answer
904 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 ...
0
votes
0answers
27 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 ...
1
vote
2answers
262 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 ...
0
votes
0answers
54 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 ...
-5
votes
1answer
59 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 ...
1
vote
1answer
802 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 ...
0
votes
1answer
715 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 ...
1
vote
3answers
7k 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 ...
-2
votes
3answers
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 ...
0
votes
2answers
526 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 ...
0
votes
1answer
565 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 ...
0
votes
1answer
220 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....
2
votes
1answer
557 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 ...
0
votes
1answer
2k 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,...
0
votes
2answers
15k 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 ...
-2
votes
2answers
942 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 ...
2
votes
0answers
995 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 ...
8
votes
2answers
5k 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/...
1
vote
1answer
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 +%...
0
votes
1answer
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", ...
2
votes
2answers
2k 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
2k 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 ...