? ? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
23 Aug 2015

See #4508 for info


Steps to reproduce the issue

For a calendar form field you set the default value to "NOW" and add a new item.
To test you can edit any form with a calendar field.

Expected result

  1. The actual user date and time shown or
  2. The actual server date and time shown depending on the filter used

Actual result

The date and time is wrongly calculated with the actual server date and time as basis.
Must use UTC+0 as basis.

System information (as much as possible)

J 3.3.6

Additional comments

PR on GitHub
calendar.php
// Handle the special case for "now".
if (strtoupper($this->value) == 'NOW')
{
//$this->value = strftime($format);
$this->value = JFactory::getDate()->toSql();
}

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar mbabker mbabker - open - 23 Aug 2015
avatar mbabker mbabker - change - 23 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2015
Labels Added: ? ?
avatar zero-24 zero-24 - change - 23 Aug 2015
Category Libraries
avatar zero-24 zero-24 - change - 23 Aug 2015
The description was changed
Title
Alternate fix for #4508
Wrong datetime NOW for JForm field calendar
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 23 Aug 2015

Thanks @mbabker

Based on the test by @schnuti (here: #4508 (comment)) and my own test I'm going to move this to RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7753.

avatar zero-24 zero-24 - change - 23 Aug 2015
Title
Alternate fix for #4508
Wrong datetime NOW for JForm field calendar
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2015
Labels Added: ?
avatar zero-24 zero-24 - test_item - 23 Aug 2015 - Tested successfully
avatar zero-24 zero-24 - alter_testresult - 23 Aug 2015 - schnuti: Tested successfully
avatar Kubik-Rubik
Kubik-Rubik - comment - 24 Aug 2015

Thank you @mbabker!

avatar Kubik-Rubik Kubik-Rubik - change - 24 Aug 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-08-24 08:14:13
Closed_By Kubik-Rubik
avatar Kubik-Rubik Kubik-Rubik - reference | d52942c - 24 Aug 15
avatar Kubik-Rubik Kubik-Rubik - merge - 24 Aug 2015
avatar Kubik-Rubik Kubik-Rubik - close - 24 Aug 2015
avatar Kubik-Rubik Kubik-Rubik - change - 24 Aug 2015
Milestone Added:
avatar zero-24 zero-24 - change - 24 Aug 2015
Labels Removed: ?
avatar mbabker mbabker - head_ref_deleted - 24 Aug 2015

Add a Comment

Login with GitHub to post a comment