Skip to content

Tag: timezone-offset

Get week range with timezone

I’m trying to get week range for a given date. I use the below code to do so. How can I make it work so it take timezone into account? My timezone is GMT+1 but the returned date has – 1 hour difference Answer You can use date_default_timezone_set() for that. https://www.php.net/manual/en/function.…