Adding days to a timestamp

后端 未结 7 1303
春和景丽
春和景丽 2021-02-05 07:59

Giving a starting date, I\'m adding four times seven days to get 5 different dates separated exactly a week each one.

//$date = \'28-10-2010\';
$timestamp = mkti         


        
7条回答
  •  生来不讨喜
    2021-02-05 08:31

    It really seems to be time zone/DST related.

    Adding

    date_default_timezone_set('UTC');
    

    as the first line solves the issue (as you no longer use any DST settings).

提交回复
热议问题