Questions tagged [timestamp]

A timestamp is the time at which an event is recorded by a computer system. The timestamp term may also refer to Unix Time or to the timestamp data type.

A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occurred. A timestamp is the time at which an event is recorded by a computer, not the time of the event itself. In many cases, the difference may be inconsequential: the time at which an event is recorded by a timestamp (e.g., entered into a log file) should be very, very close to the time of the occurrence of the event recorded.

In some cases, a timestamp can be just the numbering of events, the use of a date_time format to store a timestamp is then not mandatory.

This data is usually presented in a consistent format, allowing for easy comparison of two different records and tracking progress over time; the practice of recording timestamps in a consistent manner along with the actual data is called timestamping.

Timestamps are typically used for logging events, in which case each event in a log is marked with a timestamp. In filesystems, timestamp may mean the stored date/time of creation or modification of a file.


Examples of timestamps

  • 2005-10-30 T 10:45 UTC
  • 2007-11-09 T 11:20 UTC
  • Sat Jul 23 02:16:57 2005
  • 1256953732

Standardization

ISO 8601 standardizes the representation of dates and times. These standard representations are often used to construct timestamp values.


References

13570 questions
4
votes
2 answers

Issue when concatenating mkvs using ffmpeg: How to set timestamps properly?

I've attempted to concatenate 2 mkv videos with ffmpeg, using the following commands: ffmpeg -i file-01.mkv -f mpegts -c copy -bsf:v h264_mp4toannexb file-01.mpeg.ts ffmpeg -i file-02.mkv -f mpegts -c copy -bsf:v h264_mp4toannexb…
a-goonie
  • 99
  • 1
  • 10
4
votes
2 answers

How do I parse string timestamps of different length to time?

I have a slice of values holding timestamps of different length. Most of them look like this: 2006-01-02T15:04:05.000000Z but some of them are shorter: 2006-01-02T15:04:05.00000Z 2006-01-02T15:04:05.0000Z If I do: str :=…
myNickname
  • 63
  • 5
4
votes
1 answer

What do the ALSA timestamping function return and how do the result relate to each other?

There are several "hi-res" timestamping functions in ALSA: snd_pcm_status_get_trigger_htstamp snd_pcm_status_get_audio_htstamp snd_pcm_status_get_driver_htstamp snd_pcm_status_get_htstamp I would like to understand what points in time the resulting…
Jan Deinhard
  • 19,645
  • 24
  • 81
  • 137
4
votes
5 answers

$var is valid unix timestamp

I need a function to validate if the content of a variable is a valid unix timestamp. I've checked this thread: Check whether the string is a unix timestamp but the problem is that the function in the most voted answer still can cause some errors,…
mjsilva
  • 1,327
  • 3
  • 13
  • 21
4
votes
2 answers

socket.io with strange timestamp format (?)

I see requests to socket.io containing parameter t to be like LZywzeV, LZz5lk7 and similar. All examples that i found so far used second- or millisecond-based UNIX timestamps. Has anyone ever seen a timestamp format like this? (It is not…
AsconX
  • 161
  • 1
  • 15
4
votes
6 answers

From timestamp to Date Android

Good day, I have timestamp 1481709600 and I would like to have this time format Wed, 14 Dec 2016 I'm trying to do that using: private String getDateFromTimeStamp(Integer dt) { Date date = new Date (dt); return new…
VLeonovs
  • 2,193
  • 5
  • 24
  • 44
4
votes
3 answers

Event sourcing microservices: How to manage timestamp

We have microservices, each generating events that are being stored by a event-sourcing repository. We use Cassandra to store the event data. As you may know, the order of the events is important. When we generate these events from different…
siliconsenthil
  • 1,380
  • 1
  • 14
  • 25
4
votes
1 answer

git: How do I revert all files where the only change is a modified timestamp?

I have a lots of modified files in a git repo. I need to prune the ones where there is no change, where only the timestamp has changed. Due to the amount of files it would take me a loong time to do that manually. Is there some smart way to do that?
Invariant
  • 185
  • 1
  • 11
4
votes
1 answer

postgresql insert timestamp error with python

I use psycopg2 for postgresql. Here is my snippet: a = "INSERT INTO tweets (Time) VALUES (%s);" % (datetime.now(),) cursor.execute(a) this won't work and gives me an error: ProgrammingError: syntax error at or near "20" LINE 1: INSERT INTO tweets…
user3716774
  • 431
  • 3
  • 11
4
votes
2 answers

R - curl - download remote file only when changed

For a project I need to download regularly data files from different websites to create an indicator based on those files. As the update frequency of those files varies a lot, I am looking for an efficient way to detect whether a remote file was…
Lod
  • 609
  • 7
  • 19
4
votes
2 answers

SQL 'AT TIME ZONE', query wide and with a 'SELECT' all columns (tablename.*) expression

I use timestamp(3) with time zone in my database for the tables when one is necessary, this is almost any case in my situation. I need to select all columns of a table possibly in a much more complex query than the following. My question is how to…
sçuçu
  • 2,960
  • 2
  • 33
  • 60
4
votes
3 answers

moment-timezone: unix timestamps with timezones

i am using momentjs.com with nodejs and im trying to get unix timestamps for multiple timezones, but sadly the the output is not correct. code: var moment = require('moment-timezone'); var berlin = moment.tz('Europe/Berlin').unix(); var angeles =…
suellen
  • 43
  • 1
  • 1
  • 3
4
votes
2 answers

Powershell - modify Date and Time of a file to reflect its filename

I have had to recover a load of files from a memory card to my hdd. The names for the recovered files on my hdd are in the format "yyyymmdd_hhmmss.mp4", and do show the correct times & dates. However, the date modified column for these recovered…
4
votes
1 answer

MySQL Timestamp return as datetime, not integer

I have MySQL table, where column _update is timestamp type. I have problem, and don't understand, why when I do select this column, is return in datetime format, not in integer? In JavaScript Unix timestamp is returned as integer, in PHP time() is…
Peter
  • 499
  • 10
  • 30
4
votes
2 answers

Solutions to put different values for a row-key but the same timestamps in hbase?

I'm new at Hbase. I'm facing a problem when bulk loading data from a text file into Hbase. Assuming I have a following table: Key_id | f1:c1 | f2:c2 row1 'a' 'b' row1 'x' 'y' When I parse 2 records and put it into Hbase at the same…
Bing Farm
  • 75
  • 1
  • 8