?
avatar alagesanbe08
alagesanbe08
10 May 2017

Steps to reproduce the issue

$tz = "Asia/Kolkata";
$date = JFactory::getDate('now',$tz);
print_r($date);

Expected result

  JDate Object
  (
    [tz:protected] => DateTimeZone Object
    (
        [timezone_type] => 3
        [timezone] => Asia/Kolkata
    )

[date] => 2017-05-10 14:46:15
[timezone_type] => 3
[timezone] => Asia/Kolkata
)

Actual result

JDate Object
(
  [tz:protected] => DateTimeZone Object
    (
        [timezone_type] => 3
        [timezone] => Asia/Kolkata
    )

 [date] => 2017-05-10 08:46:15
 [timezone_type] => 3
 [timezone] => Asia/Kolkata
)

System information (as much as possible)

Additional comments

problem in JDate constructor

line no:114

  $date = parent::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''), $tz)->format('Y-m-d H:i:s.u');

its return wrong

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
5.00

avatar alagesanbe08 alagesanbe08 - open - 10 May 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 May 2017
avatar Bakual
Bakual - comment - 10 May 2017

Can you try if #15853 fixes this?

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 May 2017
Status New Information Required
avatar PhilETaylor
PhilETaylor - comment - 15 May 2017

Cannot replicate with Joomla 3.7.1rc2 at 61b9fcc
Cannot replicate with Joomla 3.7.0 at 011a6f5

avatar Bakual
Bakual - comment - 15 May 2017

Closing as it is presumable fixed with #15853

avatar Bakual Bakual - change - 15 May 2017
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2017-05-15 19:07:13
Closed_By Bakual
avatar Bakual Bakual - close - 15 May 2017

Add a Comment

Login with GitHub to post a comment