date

Date is incorrect in wifi : system clock synchronization is not active

Date is incorrect in wifi : system clock synchronization is not active I have compiled a read-only rootfs image with yocto for my raspberrypi4. I have noticed that my date is incorrect uniquely in wifi. Indeed when I type the command timedatectl status I have the following: System clock synchronized: no I do not understand …

Total answers: 1

How could March 30th 2024 be followed by the 1st?

How could March 30th 2024 be followed by the 1st? I am in the EU zone +1 or when DST is on, +2. Now is Sunday 31.3.2024. This Sunday morning, we changed into DST, at 2→3 (CET → CEST). I have Linux servers in separate networks reporting monthly energy consumption at 23:58 of the last …

Total answers: 1

Convert EPOCH string in filename to readable format

Convert EPOCH string in filename to readable format My knowledge of Unix is not very good. I’m trying to write a shell script to rename a set of files in a directory, like 1709532255.mp4 to 20240304_070415.mp4, where 1709532255 is always an epoch time. I found that date -d @1708532255 +’%Y%m%d_%H%M%S’ … gives me the wanted …

Total answers: 6

Removing Minutes from Date as a Variable

Removing Minutes from Date as a Variable I am writing a script in KSH and need your help to find the logic to remove minutes and seconds from the date. If users pass 2024-12-22-16-43-40 to a variable, it should be converted to 2024-12-22-16-00-00. Asked By: jayvardhan || Source Something like: (treat it as a string …

Total answers: 2

Issue with touch -t command when setting specific dates

Issue with touch -t command when setting specific dates I’m encountering an issue when using the touch -t command in the terminal. My goal is to adjust the access and modification dates of a file named "testShell00" to a specific date in the format MMDDhhmm[.ss]. However, I’m getting unexpected results. Here are some examples of …

Total answers: 2

How to change style and language of timezone

How to change style and language of timezone Ubuntu 23.10 How one to change the STYLE of timezone? I live in Ukraine, however I do prefer an English version of the system. But, my date is in Ukrainian language, what is somewhat out of place. e.g. Today is 21st of December, 21.12.2023 It is shown: …

Total answers: 1

Change the last modification time of subfolders to that of the oldest file inside

Change the last modification time of subfolders to that of the oldest file inside Hello I would like to know how to scan and change the last modified date of all subfolders based on the oldest file in each subfolder. Example of Ubuntu folder structure: home/incoming/media/Something.something.1234/ or /Soemthing Soemthing 1234/ Which means there are folders …

Total answers: 1

Is there a tool to test if a date-time is in a given range?

Is there a tool to test if a date-time is in a given range? I need to develop a script to test if "now" (e.g. the output of date) is in a given range. For now, this range is expected to be a list of days of month (e.g. 10,11,12,13,21,22,23). And I could code that …

Total answers: 1

Changing non-standard date timestamp format in CSV using awk/sed

Changing non-standard date timestamp format in CSV using awk/sed I have a csv with a few hundred thousand lines and I’m trying to change the date format in the second field. I should also add the second field is sometimes not populated at all. The deplorable input format is DayofWeek MonthofYear DayofMonth Hour:Minute:Second Timezone Year …

Total answers: 4

Update any date to the current date in a text file

Update any date to the current date in a text file I have a text file which contains several occurrences of dates. All the dates are written in the format Mon-DD-YYYY. I have to update all these dates in the current date keeping the format Mon-DD-YYYY. The scripting language is bash. One big problem is …

Total answers: 2

Synching time and date of two Ubuntu machines not connected to the internet

Synching time and date of two Ubuntu machines not connected to the internet I have two machines machine A with ip 192.168.0.2 machine B with assigned IP 192.168.0.3 They are both connected to a local network and I would like to set the date and time of machine A to match those of machine B. …

Total answers: 4

Output date into specific column using bash

Output date into specific column using bash I want to output the date into a csv column using a bash script ignoring the header. I have this but it only gives the day of the week abbreviated and not does not place it in a specific column: date | awk ‘{print $1}’ >> date.csv Here …

Total answers: 2

Unix: how to get number of days from a given date like 10Dec2022

Unix: how to get number of days from a given date like 10Dec2022 Team, Can someone help find code for below.. Unix: how to get a count of number of days from a given date like 10Dec2022 to today. Looking for Answer: 102 as of (22Mar2023) Asked By: RaviKumar || Source If you need to …

Total answers: 2

Where is timedatectl information stored?

Where is timedatectl information stored? I am working on an embedded system without RTC battery. The time is synchronized via NTP when internet connection is available (which does not always happen). When the device is shut down, the time is reset to a past value. Sometimes I notice that this "default" value has been updated …

Total answers: 1

How can I transform dates expressed with month names to numerical month designations?

How can I transform dates expressed with month names to numerical month designations? I use MacOS and I have variable date in format 3.Jan.2023, 12.Nov.2017, 9.Apr.2022, … I need to change in 03.01.2023, 12.11.2017, 09.04.2022, … Asked By: Kire || Source You can use awk to convert from one format to the other: awk -F. …

Total answers: 5

How to change the time zone string of date command?

How to change the time zone string of date command? I’m curious about how to change the abbreviation of time zone shown by date command. Let the time zone unchanged, but how to change CST below to UTC+8? clay@LAPTOP-3PP2093I:~$ date Thu Dec 1 23:05:28 CST 2022 Thank you! PS 1. OS is ubuntu 22.04 PP …

Total answers: 1