About the modification time obtained in the http interface

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
UremSept
Posts: 2
Joined: Fri Dec 27, 2019 6:57 am

About the modification time obtained in the http interface

Post by UremSept »

Hi,I use http request to search server data, for example:

Code: Select all

http://192.168.34.205:8080/?search=1912240413&json=1&path_column=1&size_column=1&date_modified_column=1
The data returned by the server is as follows:

Code: Select all

{
"totalResults": 68,
"results": [
{
"type": "file",
"name": "312W4-19120008_FDB27CQ8SRC006W_FT1_TFZC-364_20191224041322_AB05_UAE399_209015_dlogTDO.csv",
"path": "E: \\ data20191101 \\ 3380P \\ TFZC-364",
"size": "3087170",
"date_modified": "132216175523932590"
}
......
How do I convert "date_modified": "132216175523932590" into our usual time? I have never seen such a timestamp
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: About the modification time obtained in the http interface

Post by void »

Everything uses FILETIMEs.

A FILETIME is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).

A Javascript Date is the number of milliseconds since January 01, 1970, 00:00:00 UTC.

Divide by 10000 to convert 100-nanosecond to milliseconds.

Minus 11644473600000 milliseconds to offset from the year 1601 to 1970.

Please try the following javascript:
var date_modified_as_date = new Date ((date_modified_as_filetime / 10000) - 11644473600000);
UremSept
Posts: 2
Joined: Fri Dec 27, 2019 6:57 am

Re: About the modification time obtained in the http interface

Post by UremSept »

void wrote: Fri Dec 27, 2019 8:16 am Everything uses FILETIMEs.

Please try the following javascript:
var date_modified_as_date = new Date ((date_modified_as_filetime / 10000) - 11644473600000);
alright, thank you very much.
Post Reply