There is a unixtimestamp (for example: 1421279818 = 01/14/2015 23:56:58 UTC).
It is necessary to make changes with the time, without touching the date.
Algorithmically, for example:
'14.01.2015' + ('23:56:58' * 20) и получить новые дату и время. When multiplied, the overflow time will go to the extra response days. If we multiply the whole value, naturally, the answer is incorrect, because it turns out:
'14.01.2015 23:56:58' * 20 We translate the time in seconds and multiply:
86218 * 20 = 1724360 = 19Д 22:59:20 Then we take the date:
1421279818 - 86218 = 1421193600 We add the result:
1421193600 + 1724360 = 1422917960 We get 02.02.2015 22:59:20
The question is: is there something standard for such calculations in Delphi or Php or do you need to invent your own?
In Delphi, you can translate, for example, in DateTime, divide it into components, then sum up them separately and monitor the overflows of days / months / years, take into account a leap year and so on ...
Easier, probably, and to work with unixtimestamp?