How much is one day in seconds? So I need to add one day to time ()?

    1 answer 1

    $dayTime = 60*60*24; 
    • It is interesting, if on this day (in this place) there was a transition to summer / winter time, then how should I count? - avp
    • It is quite difficult ... The simple reason for this is that far from all countries this transition takes place at all and not at the same period of time. In this particular case, it will not be so important. the task is to add a day to the time () call. In the general case, you cannot foresee everything in any way =) - Zowie
    • That the transition in different countries (at different periods of history) in different ways is understandable. The question is, for example, if on October 10, 19xx of the year at 2.00 there was a transition to winter time, then (as I recall) the hands are moved back an hour (i.e., instead of 2.00 on the clock (again !!!) 1.00). The duration of this day (October 10) was 25 hours? - avp
    • Yes, usually it is either not taken into account at all, or specific rules are written with an emphasis on the target audience. I repeat once again - in the context of this task it does not matter. @avp - although, I suppose, date conversion problems are solved at the OS level, judge for yourself - timestamp is longint, and it’s common for the whole globe, so there are always 60*60*24 seconds in the bottom ... PS: In general, never so deep I dug and did not think about such issues ... PPS: I hope not to have it =) - Zowie
    • I didn’t practice in practice either, but to think IMHO is never harmful. The connection between the longint type for the timestamp (and what do you mean by the timestamp concept? (I always thought it was the number of seconds from EPOCH)) and "so there are always 60 * 60 * 24 seconds in the bottom ..." please explain if difficult. - avp