Is it possible in PHP to get the timezone offset for a given location? E.g. when given the location \"Sydney/Australia\" to get the timezone offset as \"+1100\". Bonus would be
You can use the DateTimeZone class.
getOffset(new DateTime("now")); // Offset in seconds echo ($offset < 0 ? '-' : '+').round($offset/3600).'00'; // prints "+1100" ?>