Actually I encounter a problem with usage of JDate.
Joomla has a class JDate for managing dates. I tested the following code:
$date = new JDate('2017-07-28 00:00:00'); $timestamp_jdate = $date->toUnix(); $timestamp = strtotime('2017-07-28 00:00:00');
I was expecting that $timestamp_jdate and $timestamp returned the same result but this is the results I obtained: $timestamp_jdate = 1501200000 $timestamp = 1501192800
Did I do something wrong? How can I fix it?
I saw in the API that the JDate constructor can have a second parameter $tz but it is not well documented so maybe I have to set this parameter?
Any help would be grateful :-)