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
1 answer

What is the max year that java.sql.Timestamp can handle?

I am trying to create a maximum date in my program with the following: import java.util.Date; import java.sql.Timestamp; Date maxDate = new Date(Long.MAX_VALUE); ... Timestamp ts = new Timestamp(maxDate.getTime()); If I am correct…
Tamas G.
  • 677
  • 3
  • 21
  • 38
4
votes
1 answer

Why do I get a result many thousands of years in the future when I call UnixToDateTime?

I have the following timestamp: 1444288186967. When I put that in a Epoch Converter, I get correctly 08 Oct 2015 07:09:46 as result. However, when I use (as mentioned in another post) the function UnixToDateTime(const AValue: Int64): TDateTime I get…
davepaul12
  • 391
  • 4
  • 15
4
votes
1 answer

Pandas - join by time proximity

I have 2 dataframes, left_df and right_df , each of which has a column corresponding to datetime. I want to join them in such a way, that for every row R in left_df, I find the row in right_df that is closest in time to R out of all rows in…
Baron Yugovich
  • 3,843
  • 12
  • 48
  • 76
4
votes
2 answers

What is the Objective-c equivalent to java timestamp?

I've not found a answer to this question anywhere, but this seems like a typical problem: I have in Objective-C a "NSDate timestamp" that looks like "2010-07-14 16:30:41 +0200". The java timestamp is just a long integer (for example:"976712400000").…
jcdmb
  • 3,016
  • 5
  • 38
  • 53
4
votes
2 answers

Android BLE: Convert ScanResult timestampNanos to System nanoTime

When scanning for Bluetooth Low Energy packets I receive ScanCallback with ScanResult being set. I can get "Device timestamp when the scan result was observed" with result.getTimestampNanos() but this time is not aligned with the Systems.nanoTime().…
hebeha
  • 362
  • 2
  • 17
4
votes
2 answers

Extract specific time field from timestamp in logstash

I have an automatically generated @timestamp with the default format. What i would like is to extract the hour/month/weekday of the timestamp putting it in another field. For example, now my timestamp looks like that: @timestamp:…
Bertofer
  • 770
  • 6
  • 18
4
votes
1 answer

Selecting the number of last consecutive days from timestamp (excepting today)

I have a table A_DailyLogins with the columns ID (auto increment), Key (userid) and Date (timestamp). I want a query which would return the number of last consecutive days from those timestamp based on the Key, for example if he has a row for…
4
votes
1 answer

How to use the MySQL CONVERT_TZ function in a JPQL or HQL query

I currently have table in a MySQL database which has a startDate and endDate which are both timestamps. This is linked to the code using hibernate. I can return these by using the following HQL SELECT startDate, endDate FROM Reservation where id =…
Hip Hip Array
  • 4,665
  • 11
  • 49
  • 80
4
votes
1 answer

Query the latest document of each type on Elasticsearch

I'm trying to run what started to look like a simple query on Elasticsearch, but I just can't seem to get the result I'm looking for. Here's a brief example of what I'm trying to do: I have a database of news. Each piece of news contains a source, a…
Gonçalo Cabrita
  • 353
  • 1
  • 5
  • 11
4
votes
0 answers

emacs org-mode: Number of working days between two timestamps

The following table in Emacs' org-mode automatically calculated the number of days between timestamps in columns 1 and 2 and put the results in column 3. | <2015-07-24 Fri> | <2015-07-22 Wed> | 2 | #+TBLFM: $3=$1-$2 I was wondering if there is a…
Stefan
  • 1,757
  • 1
  • 10
  • 8
4
votes
3 answers

Kerberos Timestamp

Could anyone please explain how timestamps in Kerberos protect from Replay attacks? Thanks
froufrou
  • 41
  • 1
  • 2
4
votes
1 answer

Symony2, doctrine datetime in microseconds

In symfony2 I have created entity with created and updated parameters: /** * @var \DateTime $created * * @Gedmo\Timestampable(on="create") * @ORM\Column(type="datetime") * @Serializer\Expose */ protected $created; …
Gasper
  • 959
  • 3
  • 11
  • 29
4
votes
2 answers

MySQL trigger DELETE old rows AFTER INSERT

Whats wrong with this MySQL trigger? After insert I'm trying to delete rows older than 1 month. This trigger only removes the last inserted row. CREATE TRIGGER `users_logins_delete_olds` AFTER INSERT ON `users_logins` FOR EACH ROW BEGIN DELETE…
lingo
  • 1,848
  • 6
  • 28
  • 56
4
votes
1 answer

querying ISODate from unix timestamp in MongoExport

I'm currently facing a problem to export using the tool mongoexport. Impossible de to create a date from a timestamp in my query : db.getCollection('FooBarBarFoo').find({"actKey":"foobar","dt":{$gt:new Date('1434907890000')}}) Here some tests I…
Thomas Leduc
  • 1,092
  • 1
  • 20
  • 44
4
votes
1 answer

Yii2 - jui datepicker extension - display current timestamp by default

i'm using Yii2 extension - Jui DatePicker. Is there a way to show by default the current timestamp in the text box, so the user does not need to input it every time it fills de form fields? My view, and the form in Yii2: field($model,…
André Castro
  • 1,527
  • 6
  • 33
  • 60