Questions tagged [timestamps]

timestamp is used for questions that are about data specifying seconds since the epoch (19700101T00:00:00) or possible some other standard, and also for (date) and time information in filenames.

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

SO_TIMESTAMPING: Overhead?

I use SO_TIMESTAMPING with SOF_TIMESTAMPING_RX_SOFTWARE to generate software timestamps for TCP and UDP streams. Is it known what's the overhead for using this flag? Does the throughput or the latency ...
Kevin Meier's user avatar
0 votes
0 answers
13 views

SO_TIMESTAMPING: Which timestamp is used if we read multiple packets at once?

Given Linux is used and packet timestamping is enabled with SO_TIMESTAMPING for a TCP socket and we read now some data, what timestamp will be reported if the byte-stream which we read was merged out ...
Kevin Meier's user avatar
2 votes
0 answers
21 views

How to cancel a packet scheduled for time-based transmission after it's enqueued?

I have a time-sensitive networking application I am writing that involves receiving individual Ethernet frames, and then sending the data onward in another Ethernet frame after a precise 1 second ...
AJMansfield's user avatar
1 vote
3 answers
245 views

How to call script with timestamps relative to now, on Solaris?

We have List Error shell script, but I run it manually daily. I want to run the script via crontab automatically. My script : #!/bin/sh ent programe -a$1 -b$2 -c$3 -d$4 -tTE -oListErrorTE.txt grep &...
SLALOMS's user avatar
  • 11
0 votes
1 answer
31 views

How to preserve file creation date when overwriting files?

When I'm overwriting one file with another one, not only it's modification time updates, but also birth time, which is unwanted. I want to make Dolphin overwrite files that way, so target's birth time ...
Velent's user avatar
  • 39
3 votes
2 answers
600 views

Why does this use of `cp -a` not preserve creation time?

I copy some directories with -a in order to preserve=all which I understood would include creation times: cp -a ./* /mnt/destination/ When inspecting the resulting directories in the destination they ...
Andreas's user avatar
  • 511
0 votes
0 answers
30 views

Showing the Creation date of a File [duplicate]

I guess there's no way to get that under most Linux flavors, please correct me if I'm wrong. My hack is to go up a directory level and get the info and the directory containing the file I'm ...
user13574's user avatar
16 votes
4 answers
3k views

date - Can't Go Back More Than 115 Years or Can't Go 5879565 Years Into the Future

TZ=CEST, date (GNU coreutils) 8.32: date -d "115 years ago" Di 11. Aug 13:37:54 CET 1908 date -d "116 years ago" date: invalid date ‘116 years ago’ Questions Is it possible to ...
Pixelbog's user avatar
  • 540
15 votes
1 answer
4k views

The 01:00 in 1 January 1970 at 01:00

I will not ask why a timestamp is 1 January 1970 at 00:00 but in several cases in my computer they are 1 January 1970 at 01:00, how did the 01:00 coincidentally get set with a number of apps?
Niklas Rosencrantz's user avatar
1 vote
3 answers
95 views

How to change modification date for files in dir to match name order?

This is a self answered question for something others also might find useful. In Dolphin, I sometimes switch between sorting by name and sorting by modification date. However, it can be annoying since ...
klutt's user avatar
  • 554
0 votes
2 answers
40 views

Unable to maintain createTime with rsync (but cp -p works)

I'm running into a strange issue with timestamps when trying to copy/backup files from my Mac to a shared drive on TrueNas. My drive is defined in TrueNAS as a Home Share and mounted in MacOS via the ...
Eric B.'s user avatar
  • 645
0 votes
0 answers
164 views

How accurate is the PPS device?

I am doing research in timing synchronization, and want to measure how time synchronization is impacted by injecting various faults into a system. I understand that the PPS devices on linux machines ...
stochasticlover1's user avatar
0 votes
0 answers
25 views

Timestamp format different in date and ls -- locale problem?

In ls -l, file timestamps are shown as May 12 18:19 in 24-hour format. date shows Fri May 12 06:26:44 PM UTC 2023 in 12-hour format. Is that how it is supposed to be? Or do I have my locale setup ...
Johannes Ernst's user avatar
0 votes
1 answer
19 views

Getting year of Postixct format

"Thu Apr 21 11:15:00.375 2022" how to get the year of this expression? Followings are tested. 1- as.POSIXct(strptime("Thu Apr 21 11:15:00.375 2022", format='%c'),origin='1970-01-01'...
Fkiran's user avatar
  • 3
0 votes
0 answers
54 views

InfluxDB InfluxQL v1.8 : Wrong timestamp used for writing to database

I wrote a bash script for inserting the summary of the daily energy database "xxx_d" into the monthly database "xxx_m" - triggered on every 1st day of the month at 02 o'clock by a ...
6a5h4's user avatar
  • 1
25 votes
4 answers
5k views

Should I (still) use UTC for all my servers?

My employer is located in Europe (CET), and therefore we use daylight saving time, which requires shifting an hour hence and forth twice a year. Our servers are running in the cloud in different ...
Patrick Bucher's user avatar
0 votes
1 answer
38 views

Set explicit time with date

When I tried to set time with $(date +%s -d "2022-04-10 12:12:12") I get the time 2022-04-10 19:12:12 How can I set the time explicit?
Timestamp's user avatar
2 votes
1 answer
133 views

Why is atime updating when equal to mtime and ctime?

I'm trying to understand how inode access time is handled with the default "relatime" mount option in Linux, but the behavior documented in mount(8) doesn't quite match what I see. It says: ...
epiii2's user avatar
  • 23
4 votes
3 answers
748 views

Converting epoch time format saved in a text file to human friendly format

I have a file name simcloud-target.txt where dates are saved in epoch time format i want to convert all the dates to human friendly format and print it as a list (same as the out put shown below so ...
saifi rahman's user avatar
1 vote
0 answers
67 views

How to change birth/creation time without copy the whole file?

In Btrfs, stat a file will show birth time, which I try to change but find the method is always about copying the whole file, that would be a time waste, it'd be good to change it like access, modify, ...
user551324's user avatar
0 votes
0 answers
10 views

Automatic time-stamping of virtual-com data

I am using a virtual serial port to import data from a microcontroller. I want the data time stamped as soon as possible, preferably immediately upon recovering the packet. Does Linux do this ...
FourierFlux's user avatar
2 votes
1 answer
378 views

Convert Xorg log timestamps to human readable timestamps

I need to change the time stems of a whole Xorg/X11 log file (e.g. /var/log/Xorg.0.log) into human readable format. The default format is the time in seconds since boot, preferably yyyy-mm-dd + time. ...
Sebastian DonnerWolfBach's user avatar
1 vote
0 answers
38 views

Listing 'at' jobs with custom time format

Hello I need to list 'at' jobs with the following format "year-month-day hours:minutes:seconds". From the 'at' man page the synopsis I need is the following: at [-V] -l [-o timeformat] [job ...
Centuri0n's user avatar
0 votes
1 answer
292 views

Use awk to change timestamp on column from the ISO 8601 format

I have an output like this: echo "$i" **@timestamp:** `2023-01-18T15:08:36.698Z` I would like to output this in awk and make it look like this: Wed 18 Jan 2023 06:50:38 PM EST Here's what I ...
mimisashi's user avatar
8 votes
1 answer
537 views

Deleting a hard link's tail file changes the change time of the head or vice versa. Why?

Note: Question although says vice versa but it really does not have any meaning since both of them point to the same inode and its not possible to say which is head and which is tail. Say I have a ...
Himanshuman's user avatar
0 votes
1 answer
49 views

Journald and Sources of Log Messages

I would like to know what process is meant to write Timestapms (and other parts of Log messages) in Syslog protocol. In other words, is it Syslog that sets timestamp of log message (exact time of ...
GabrijelOkorn's user avatar
1 vote
1 answer
326 views

Understanding timestamps in a GNU Parallel --joblog output

Does GNU Parallel start a batch of as many jobs as possible (the number of jobs started being governed by GNU Parallel internals or/and the -j option along with given parameters), and once complete, ...
Nikos Alexandris's user avatar
1 vote
1 answer
70 views

Interpolate timestamps and replace empty fields in CSV files

I have CSV files with the following elements: timestamp, data1, data2, data3, data4, data5 2015-03-16 00:00:00, 3, 3, 4, 2, 5 2015-03-16 00:10:00, 4, 7, 8, 9, 3 2015-03-16 00:20:...
dante_t's user avatar
  • 79
2 votes
1 answer
575 views

when will a Y2K time overflow problem happen in modern 21st century Linux?

referencing Why does Unix time start at 1970-01-01? An answer mentioned The end of Unix Time will occur on January 19, 2038 03:14:07 GMT. On January 19, 2038 03:14:08 GMT all computers that still use ...
ron's user avatar
  • 5,846
0 votes
2 answers
2k views

How to convert a Timestamp to Unix Epoch time using Bash

I have a timestamp similar to this: 2022-11-09T14:41:15.555641007Z I would like to convert this to Unix epoch time in seconds like this: 1668005090 How can I achieve this using bash?
Mayur Raiturkar's user avatar
0 votes
1 answer
124 views

How can get the time variable's timestamp?

In my os date Tue 01 Nov 2022 06:58:10 PM HKT Get unix timestamp date +%s 1667300297 Get the utc time. date -u Tue 01 Nov 2022 10:58:08 AM UTC If i assign a variable as a UTC time x=$(date -u) How ...
newview's user avatar
  • 205
0 votes
1 answer
302 views

`cat` affects last `Access` time but not last `Change` time

On my Ubuntu system, I've created a new file prueba.txt using touch prueba.txt. When I show its file statistics using stat prueba.txt, the output is as follows: File: prueba.txt Size: 0 ...
Franklin Pezzuti Dyer's user avatar
3 votes
1 answer
1k views

Copy a file and preserve its creation date

I need to copy files and preserve all their metadata, including creation date. I found ways to use rsync options to preserve modification date, but I also need the creation date to be the same, and ...
QDelage's user avatar
  • 31
3 votes
2 answers
849 views

How to rename multiple files with the time created?

#!/bin/sh for f in *.png do echo mv -n "$f" "$(date +%Y%m%d-%H-%M-%S)_$f" done I want to rename several files with their timestamp as stated in (ls -lt --full-time), but I run ...
qwerty's user avatar
  • 29
0 votes
1 answer
124 views

Update only permissions etc. with rsync

I'd like to know if the following scenario will update permissions, ownership, timestamps etc. Say I transfer a folder from a destination to another using rsync -zr source/ dest/, and then use the ...
telometto's user avatar
  • 1,835
0 votes
1 answer
137 views

Access time strangeness

According to the mount man page, Access time is only updated if the previous access time was earlier than the current modify or change time. However if I do this (ext4 with relatime option(*)): > ...
xenoid's user avatar
  • 8,668
1 vote
1 answer
83 views

After enabling ETF qdisc packets are only sent for a few seconds

I have two computers that are connected via an Ethernet cable with Ubuntu 22.04 installed on them. I have a client on computer A) which is sending UDP packets to a server on computer B). I am ...
Nandor Takacs's user avatar
2 votes
2 answers
1k views

Script - Compare filename date with current date

I'm trying to compare a file with date in its name to the current datetime of the system: Filenames are with the following format: FileName.yyyymmdd.hhmm.file (e.g. File156tr.20220914.0958.txt) I have ...
joniop's user avatar
  • 51
1 vote
1 answer
203 views

File timestamps on different OSes

Are file timestamps (Created/birth, accessed and modified) the same on different OSes? Particularly on Windows and Linux. I downloaded a file which is modified on Windows and its timestamps looked ...
Pverpa's user avatar
  • 11
1 vote
3 answers
58 views

Impossible modified dates

I was listing the last modified files in the root directory and found something interesting regarding some dates, so I would like to know the reason behind it. I know that you can easily modify the &...
Lucius's user avatar
  • 101
-2 votes
2 answers
122 views

Real Time clock regarding timestamp storage

I gone through some of the datasheet regarding RTC like MCP79411X, but having confusion like where RTC stores timestamp in sram or eeprom, can anyone explain me the flow of the below fig suppose ...
Sukanya U's user avatar
-2 votes
3 answers
51 views

cert expired report per date

Hi How can i sort below file so as to have cert expiration date is used to sort this, thanks Cluster10* expire date: Feb 22 23:59:59 2024 GMT Cluster11* expire date: Feb 1 23:59:59 2023 GMT ...
Kiran Kumar's user avatar
-1 votes
2 answers
199 views

Where does RTC stores Date and Time in SRAM or EPROM

I gone through some of the datasheet regarding RTC like MCP79411X, but having confusion like where RTC stores timestamp in sram or eeprom, suppose RTC store Time in sram means it is volatile memory ...
Sukanya U's user avatar
0 votes
0 answers
333 views

systemd service file: including dynamic timestamp in log filenames defined in StandardOutput= and StandardError=

I've created a systemd service unit file, and since systemd version 240+, we can just set the STDOUT + STDERR outputs to go directly into files, like this: StandardOutput=append:/tmp/my-service.log ...
LaVache's user avatar
  • 353
20 votes
3 answers
3k views

What's the POSIX-compliant way to get the epoch timestamp in a shell?

I just noticed, that POSIX date doesn't seem to have the %s or %N format items. So I can't use those. What's an alternative, yet POSIX-compliant way to get the epoch timestamp in my shell script?
finefoot's user avatar
  • 2,990
1 vote
2 answers
889 views

How to delete files based on the creation date of other files?

I have a security camera running Linux (busybox 1.32.0) which I can set to record video continuously in (configurable) 30 seconds chunks in a folder structure: recording/2022/04/26/15/2022-04-26-15-30-...
FarO's user avatar
  • 214
2 votes
0 answers
320 views

Change file creation timestamp on an exFAT volume from Linux

The question As of today, Unix standards don't support a file "creation time" attribute. However, many filesystems, like ext4, exFAT and NTFS, internally do save a creation time for their ...
Totor's user avatar
  • 19.5k
1 vote
0 answers
313 views

How can I modify a file creation time in btrfs

I wanted to have snapshots on my filesystem. Since the btrfs-convert tool is not available anymore, I was forced to convert my filesystem by copying it file-by-file on a new file-system. However, I ...
Camion's user avatar
  • 274
0 votes
1 answer
3k views

Format datetime as UTC with strftime (for use in git)

I can format dates and time pretty flexibly with strftime, but from what I can see, this only will give times in my local timezone; I can add the timezone offset (e.g. '%Y %m %d-%H:%M:%S%z' for a ...
jkmartin's user avatar
0 votes
1 answer
76 views

Subset of File between two dates, when some dates are invalid

I have come across several similar questions, but the solutions seem to be failing me, and I believe it is because I have some junk data in my file that is breaking my attempt to filter by time stamp. ...
Vint's user avatar
  • 107

1
2 3 4 5
12