PHP strtotime() function wrong by 1 hour?

前端 未结 3 1353
难免孤独
难免孤独 2021-01-04 04:53

I am converting dates and times into timestamps using PHP before they are inserted into my MySQL database.

My problem is that when i use PHP\'s strtotime function th

3条回答
  •  自闭症患者
    2021-01-04 05:30

    London time zone is expressed in British Summer Time during Summer. Having said that, it's a good practice to store time in UTC and present the time to end user in either UTC or in THEIR local time.

    It is also probably wise to ensure that your system time is UTC.

提交回复
热议问题