Hey everyone so I am messing around with timezones. Right now I get the users timezone with javascript. The problem is now DST.
Has anyone come across this issue. I setup my server to be by default GMT time.
Doing a few test now i do
$date = strtotime(date("Y:m:d H:i:s"));
I now have information on the user timezone in my case US EST time.
which is -5:00 (-18000)
which now I can do
$date = strtotime(date("Y:m:d H:i:s")) + -18000;echo date('M d, Y h:i A', $date);
Its not really the correct time it is 1hour behind. I also store if the timezone goes by daylght savings time. Which i now know if i need to deduct 1 from the hour so make it -4:00 60 60 gives me 14400. so now I get the correct time.
My issue is when do I know to apply that because not all months deal with it and all timezones are different with daylight savings =/ the agony.