phpunit - Mismatch when converting unix timestamp to date -


i have database (in csv) unix timestamps. try convert them in libreoffice calc human readable date. ok... except one-day-lag.

for example, timestamp -518144400 (in e2 cell). function : =e2/86400+dateval("1/1/1970"). obtain 19572,9583333333 correspond 1953-07-31. on-line calculator confirm result.

what problem ? right answer 1953-08-01. first, thought timestamps contained mistake. but, in this php calendar, if paste -518144400 parameter in url, works. on-line calendar associate timestamp (what think is) right answer.

i don't understand happens. missed ? 1 solution adding +1 in function correct. i'm not satisfied, i'd understand...

it depends on conversion time zone, mean -518144400 (timestamp) equal 1953-07-31 in gmt

while 1953-08-01 in other time zone time relative gtm +1 or more.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -