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

Firebase: Get current time without writing to the database (IOS and ANDROID)

I want to use Firebase to get the current time on server without writing to the database and then reading it. Any one knows a solution to directly get a current time stamp from Firebase?
data
  • 739
  • 6
  • 17
4
votes
4 answers

create a Timestamp object in angularfire app

First tried import { Timestamp } from '@firebase/firestore-types'; and then how to create a Timestamp object? var now: Timestamp = ??? var now: Timestamp = Timestamp.now() //Module not found: Error: Can't resolve '@firebase/firestore-types'
4
votes
1 answer

Converting weird timestamp with php date() for Woocommerce

The timestamp in question 2018-02-08T09:51:54+00:00 Im using the SendinBlue woocommerce plugin to send my store emails and handle the templates but when inserting the order date, which the plugin gets by means of $order->get_date_created() the…
blackhill24
  • 422
  • 14
  • 30
4
votes
1 answer

Moment.js issues with .format() using Zulu time

I am working on a script that needs to retrieve and store a timestamp from a database. The timestamp from the database is retrieved as a UTC Zulu formatted string "YYYY-MM-DDTHH:MM:SS.SSSZ". I want to store this timestamp in the format…
Todd
  • 758
  • 1
  • 9
  • 20
4
votes
1 answer

How to convert a timestamp string with 7 digits on the microseconds part using strptime?

Having a timestamp as string like 2016-09-22T13:57:31.2311892-04:00, how can one get the datetime object? I've tried using strptime for this, but I got two issues: I need to remove : from the timezone part, at the end, for %z to work properly. The…
Renato Oliveira
  • 456
  • 2
  • 7
  • 21
4
votes
1 answer

Round timestamp to nearest 30 second

I have a column in a DF and it contains timestamp in format ( yyyy-mm-dd HH:mm:ss). I need to round timestamp to nearest 30 seconds. old column desired column 2016-02-09 19:31:02 2016-02-09 19:31:00 2016-02-09 19:31:35 …
Ahmad Senousi
  • 613
  • 2
  • 12
  • 24
4
votes
5 answers

How to implement a "who's online" feature in PHP?

How would one go about implementing a "who's online" feature using PHP? Of course, it would involve using timestamps, and, after looking at phpBB's session table, might involve storing latest visits in a database. Is this an efficient method, or are…
user57365
4
votes
1 answer

What is the equivalent data type of cloud Firestore server timestamp in swift language?

I've got a data model including a timestamp field createdAt. struct Box { var title: String var createdAt: Timestamp var dictionary: [String : Any] { return [ "title": title, "createdAt": createdAt …
Vahid Hallaji
  • 7,159
  • 5
  • 42
  • 51
4
votes
2 answers

Adding timestamp to a file in PYTHON

I can able to rename a file without any problem/error using os.rename(). But the moment I tried to rename a file with timestamp adding to it, it throws win3 error or win123 error, tried all combinations but no luck, Could anyone help. Successfully…
suraj das
  • 117
  • 1
  • 3
  • 11
4
votes
1 answer

Spark parse string to timestamp with timezone

I have a string like: 2018-03-21T08:15:00+01:00 and wonder how to preserve the time zone / shift from UTC when parsing it in Spark. Seq("2018-03-21T08:15:00+01:00").toDF.select('value, to_timestamp('value,…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
4
votes
5 answers

Mysql date created (not to update when record updated)

I'm doing a mysql table and i have one column that has current timestamp on update. This is great because i can see exactly when someone uploads something. But i dont want the column to change when they edit their upload. Is it best to stick with…
benhowdle89
  • 36,900
  • 69
  • 202
  • 331
4
votes
2 answers

How to get current timestamp with milliseconds in MySQL?

I'm able to get approximate time without milliseconds by query SELECT UNIX_TIMESTAMP(NOW()); but how to get precise current timestamp with milliseconds? For example, after executing the above query I get 1352717640 value, but I want to get…
Ksenia
  • 3,453
  • 7
  • 31
  • 63
4
votes
1 answer

Invalid default value for current timestamp field in live server

Below query works fine in my localhost but When i try to execute this query in the live server it gives sql error CREATE TABLE IF NOT EXISTS `tbl_claims` ( `id` int(11) NOT NULL AUTO_INCREMENT, `claimed_profile_id` int(11) NOT…
Hetal Chauhan
  • 787
  • 10
  • 22
4
votes
2 answers

PHP convert MySQL datetime to Unix Timestamp

I'm confused about timezone differences when converting a MySQL datetime to Unix timestamp. It appears to me that MySQL datetimes (2011-02-07 09:45:00) are in the server's local timezone. I want to convert this datetime into a Unix timestamp, which…
JoJo
  • 19,587
  • 34
  • 106
  • 162
4
votes
3 answers

Best practices to insert time/time stamp in mysql

I've had some trouble choosing an efficient way to insert a time in mysql database. I know mysql has its own timestamp system but it is not what I'm looking for. I currently use date("Y-m-d H:i:s", time()); and it gets the job done. But I would…
andrewk
  • 3,721
  • 4
  • 30
  • 37