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
0 answers

Add timestamp to PDF signature using PHP

Using tcpdf library I'm able to add a signature to pdf but timestamp (RFC3161) is not yet implemented in this library (applyTSA) and I need this feature. According to ISO 32000-1:2008: Time stamp information as an unsigned attribute (PDF 1.6): The…
h2odev
  • 634
  • 9
  • 21
4
votes
2 answers

SQL/Oracle Grouping Data by field by hours for a certain type on a given day

Okay trying to construct a single query to save myself a whole bunch of time (rather than writing a ton of seperate queries), but I don't even know how to start on this. What I need to is look at single day and type and break out counts on actions,…
dscl
  • 1,616
  • 7
  • 28
  • 48
4
votes
3 answers

get unix timestamp using php

Suppose i know that today's day is monday. How do i use mktime() in php to get unix timestamp for last friday and the friday before that?? suppose today's date is 17-01-2011 and its a monday. Then i want the timestamp for 14-01-2011 00:00:00 and…
ayush
  • 14,350
  • 11
  • 53
  • 100
4
votes
1 answer

how to calculate the time between two timestamps (PostgreSQL)

Calculate the time between these two timestamps in PostgreSQL, create_time='2017-11-02 05:51:13' and update_time='2017-11-02 07:36:18' and display it on HH:MM:SS Format. it should display like this 01:45:04
user8823283
4
votes
2 answers

Timestamp in DBase7

I'm trying to read DBase 7 timestamp values from .dbf files. From DBase format specification I got the following: 8 bytes - two longs, first for date, second for time. The date is the number of days since 01/01/4713 BC. Time is hours * 3600000L +…
radjiv
  • 43
  • 4
4
votes
1 answer

Formatting timestamp using DateTimeFormatter for "early" dates

I'm implementing functionality for formatting timestamps inserted in a database. An existing solution uses SimpleDateFormat for this task. As SimpleDateFormat is not thread safe I'm converting the implementation to the use of java.time. In this…
user1239974
  • 63
  • 1
  • 6
4
votes
2 answers

Cassandra Timestamp : Incorrect time value

I am new in Cassandra. I have a Cassandra( V: 3.11 ) table (data). It is having a column timeStampCol of timestamp type and I am inserting a value in it. insert into data (timeStampCol) values('2017-05-02 17:33:03'); While accessing the data from…
DEV
  • 2,106
  • 3
  • 25
  • 40
4
votes
1 answer

JSF Converter Timestamp

I want to convert my input into a timestamp value. I have only found a dateconverter in examples. Are there any best practises? Thank you Update: I want to save a birthday of a user but my backend requires a timestamp value. And I have problems…
Sven
  • 6,288
  • 24
  • 74
  • 116
4
votes
1 answer

How to sign a PDF with embedded timestamp and LTV enabled?

I am trying to sign a pdf with timestamp and LTV enabled so that it is shown like this in Adobe Reader: In english it means that "the signature includes an embedded timestamp" and "the signature is LTV enabled". Here is the code I'm…
lucasdc
  • 1,032
  • 2
  • 20
  • 42
4
votes
4 answers

How to convert timestamp string to epoch time?

I have time stamp in format 2017-18-08 11:45:30.345. I want to convert it to epoch time, so I am doing below: String timeDateStr = "2017-18-08 11:45:30.345"; DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-dd-MM…
User7723337
  • 11,857
  • 27
  • 101
  • 182
4
votes
2 answers

PHP/MySQL timestamp and timezones

If I grab the current timestamp using the NOW() function in MySQL can I grab that field via php and give that time in different time zones? Basically converting current time in the current timezone to another timezone?
John
  • 9,840
  • 26
  • 91
  • 137
4
votes
2 answers

Having the same timestamp value for all maven project modules

I have a pom parent where we declare all our variable like timestamp and i have a maven project with 2 modules where i create artifact for each module. Look at this picture : The created artifacts haven't the same value of timestamp !! I need to…
Inforedaster
  • 1,260
  • 1
  • 23
  • 39
4
votes
1 answer

Using JAVA to store date/time info in the DB?

What is the best way/approach to store date/time info (and timestamps in general) so the information that can be displayed in different timezones? My thoughts were to make the DB just hold time in a specified format (like GMT or UTC). When one reads…
Casey Harrils
  • 2,793
  • 12
  • 52
  • 93
4
votes
1 answer

how to compare two timestamp values from mysql with php

I have a db with time stamp values in this format: 0000-00-00 00:00:00 When I add this to the db I add a minutes to the current time. Now I need to check if the current time has passed the value added to the db. (x minutes passed).. example add to…
ganjan
  • 7,356
  • 24
  • 82
  • 133
4
votes
1 answer

Cassandra Timestamp Default Now

Is it possible to have a timestamp column in a table with the default value of now, such that only the other fields are introduced?
Adrian Olosutean
  • 179
  • 1
  • 3
  • 11