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

Timestamp in Chrome DevTool’s Timeline .json

For a research project I am analyzing recordings made using Google Chrome's DevTools Timeline, meaning I run my own software over the saved .json files. I am having trouble understanding their timestamp variable though, and tools such as the…
4
votes
2 answers

Using entity framework, should I add a timestamp to all my database tables?

I'm planning to use MS entity framework for new web apps (come on EF v2!). So does it make sense to plan ahead by adding timestamp columns to all entity tables in existing and future databases, to support concurrency checks? Is there any reason why…
jamesfm
  • 869
  • 1
  • 9
  • 17
4
votes
3 answers

postgres json parse to timestamp

I am trying to get some data into my postgres DB from a CSV file containing a json dump. As long as it is just strings it is alright, but I want my strings containing timestamps to be stored as timestamps in postgres. Soo I need to do some…
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
4
votes
2 answers

How to set a timestamp to a MySQL variable?

Couldn't figure out the reason why the @previousEndTime variable is having only the YEAR value. Sample Data on my test_table: | id | name | start | end…
Anonymous One
  • 411
  • 2
  • 6
  • 16
4
votes
1 answer

Java sql - How to insert TimeStamp into a mysql database including milliseconds

How do I convert a Java TimeStamp object to a SQL datetime type that includes milliseconds? When I insert my TimeStamp obj into the database the milliseconds are gone. This is my Java source code to translate a String into a Timestamp object: import…
Craiten
  • 109
  • 1
  • 2
  • 12
4
votes
2 answers

How to compare two utc timestamps in Java?

I am using the below method to generate a UTC timestamp and would like to compare it with another. I am using Apache Commons Lang library for this. How can I compare the two timestamps and determine which one is bigger? String msgPushedTimestamp =…
Nital
  • 5,784
  • 26
  • 103
  • 195
4
votes
1 answer

Time stamp in hMAC authentication

as restful web api server, we supply our client a clientid and password. I think it is enough for the client to use clientid + hMAC(clientid hashed by password) for the authentication. I have looked through some documents which advise to use Time…
James Rao
  • 168
  • 2
  • 13
4
votes
1 answer

How to get current timestamp of realtime-clock (RTC)?

I would like to get the current timestamp of realtime clock in my BASH script. The hwclock command can print out the current time, but it is not timestamp. I have considered parsing hwclock's output and then convert the results to a timestamp, but…
Xavier Young
  • 368
  • 3
  • 8
4
votes
3 answers

Adding timestamp to log file in Spring Boot?

I am currently using Spring Boot in my application and I know that it uses Logback as its default logging implementation. Currently in my applications.properties file I have the following: #some other properties #logging details logging.path=…
java123999
  • 6,974
  • 36
  • 77
  • 121
4
votes
1 answer

Pandas Add Timestamp to file name during saving Data Frame in Excel

While i am saving Data Frames in Excel format ("*.xlsx"), i would like to add time stamp to Excel file name. How can i add run time time stamp to Data Frame while saving in Excel format while saving file using Pandas? Thank you
Felix
  • 1,539
  • 8
  • 20
  • 35
4
votes
3 answers

Converting Timestamp string "HH:mm:ss" to Duration

Just like the title says, I've been able to isolate from a text file a string containing a duration in the format of "HH:mm:ss." How would I go about converting it to a duration? I need to convert it to a double that expresses this timestamp in…
Kael Eppcohen
  • 177
  • 1
  • 2
  • 10
4
votes
2 answers

Convert 48-bits (6 octets) from DNP3 time to timestamp in python

I'm trying to convert 48-bits (8 octets) to a timestamp using python for a little security project. I'm working with some network packets from the DNP3 protocol and I'm trying to decode timestamp values foreach DNP3 class object. According to the…
nicRodz
  • 83
  • 1
  • 2
  • 8
4
votes
3 answers

How to extract millisecond from date in Oracle?

i have full date(with time). But i want only millisecond from date. please tell me one line solution for example: date= 2016/03/16 10:45:04.252 i want this answer= 252 i try to use this query. SELECT ADD_MONTHS(millisecond, -datepart('2016/03/16…
Nikunj Chavda
  • 47
  • 1
  • 1
  • 10
4
votes
2 answers

How to add 1 hour to currrent_timestamp in mysql which is the default value?

I have a database with timestamp field which takes current timestamp by default, but I have problem with the time, like if I insert the row at 9:00 it will take 8 as timestamp. So my question is how to make current_timestamp in that table add one…
Mathew
  • 137
  • 1
  • 4
  • 11
4
votes
1 answer

Unknown timestamp format output by Mongoose

I'm querying to Oplog using mongoose in node.js, to get the timestamp of the last oplog record using the following code: oplogModel.find().sort('-ts').limit(1).select('ts').exec(function(err, res){ if (err) {console.log(err);} …
Shipra
  • 1,259
  • 2
  • 14
  • 26