my server is on GMT -4 and all the records which go into the database are GMT -4 using
<?php date("Y-m-d H:i:s");?>
so if the time was 15:00:00 GMT +1 (my current timezone)
the time added to the database would be 10:00:00.
however when I use javascript new Date();
it gives it as
Thu Aug 29 2013 22:17:00 GMT+0100 (GMT Summer Time)
i have this function to convert the js date to php
$jsDate = $_REQUEST["date"];
$jsDateTS = strtotime($jsDate);
if ($jsDateTS !== false)
{
$jsDateTS = date('Y-m-d H:i:s', $jsDateTS );
echo $jsDateTS."<br>";
but it writes 2013-08-29 22:17:00
and not 2013-08-28 17:17:00
which is what I need.
how do I convert my javascript new Date to GMT -4? is it possible or not?
thanks, and sorry if I am unclear in any way.