I
I
ivandao2019-08-30 18:36:40
Computer networks
ivandao, 2019-08-30 18:36:40

In what format should the date and time be transmitted over the network?

What date and time format is considered optimal, common, and convenient for transferring between systems today.
I am making an API and sending JSON via HTTP. The recipient of the JSON is not users, but systems.
What do you think?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
skrimafonolog, 2019-08-30
@ivandao

It does n't matter what, for example
https://stackoverflow.com/questions/10286204/the-r...

2012-04-23T18:25:43.511Z
Here's why:
It's human readable but also succinct
It sorts correctly
It includes fractional seconds, which can help re-establish chronology
It conforms to ISO 8601
ISO 8601 has been well-established internationally for more than a decade
ISO 8601 is endorsed by W3C, RFC3339, and XKCD

X
xmoonlight, 2019-08-30
@xmoonlight

(Not date, but data!)
Any format.

G
Griboks, 2019-08-30
@Griboks

It is necessary to transmit the number of elapsed days / hours / seconds / ... (depending on the required accuracy) from the beginning of 2019 to the year 2100.

A
Alexey Kharchenko, 2019-09-01
@AVX

unix time
Only in the 64-bit version, so that in 2038 there will be no problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question