I'm trying to use date_default_timezone_set() in PHP, which accepts a timezone identifier as the only parameter.
How do I get the timezone identifier using only the time offset obtained with javascript, such as:
var visitortime = new Date();
timezone = visitortime.getTimezoneOffset();
So now in PHP, I have for example:
$timezone = -120;
How do I use my $timezone with date_default_timezone_set() at this point?
I was trying to go by this answer, however I'm not sure how to properly set the third parameter for date_default_timezone_set() -- the isdst parameter.
How do I know whether it's 0 or 1, depending on only the value obtained from javascript, in my case -120?