Uses dateutils;
Datetimetounix (now)
It can be converted to Unix time, but it's important to note that it gets more time than time () in C language 8*60*60
This is because now is the time of the current time zone, and the C language is calculated at GMT,
Beijing time is 8 hours more than GMT.
Datetimetounix (now) -8*60*60 is the same as time () in C.
But when I further studied the Datetimetounix function, I found that thetime in Delphi was not translated by any conversion, it was directly read the system time
I tried to change the current computer time zone and found no change to the Delphi return value.
In C + +, when changing the computer time zone, the time () return value changes as well, which means that standard times in C + + are computed by local time and the current time zone .
Therefore, when Delphi is developed, it is important to note that the time stamp obtained by Delphi is the time zone of the current computer, not the standard UTC time.
The Unixtodatetime () function does not convert the time zone, but only transforms it.
http://blog.csdn.net/missmecn/article/details/5870639
Obtaining Unix timestamps and notes in Delphi (C language time () is calculated at Greenwich Mean time, 8 hours more than in Beijing)