Bug #83675

DB Check : Full search : Advanced Query calendar problem

Added by Patrick Gaumond over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-01-24
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using TYPO3 8.7.9 , PHP 7.0.26
Tested with IE 11 and Chrome 63 under Windows 7 in Canadian French.
Module DB Check : Full search : Advanced Query

When you create a new query that use a date field (ex: Table page, FIELD:tstamp) it shows the BE calendar. If you choose "today" once you click on the "update" button next to "+" just below, the value of date goes back to "00:33 01-01-1970" (independent of the time it is).

More precisely, for every case, the input field, once the form is updated turns into "00:33 01-01-1970" but the SQL shown few lines below is different.

If equal is chosen:
WHERE (pages.tstamp = '2018-01-24T14:19:00Z')

If is greater than:
WHERE (pages.tstamp > 2018)

If between December 2017 and January 2018:
WHERE (pages.tstamp >= 2017 AND pages.tstamp <= 2018)

Patrick


Related issues

Related to TYPO3 Core - Bug #84588: Int values for field will be converted to unix timestamp in module "DB check" -> Full search Closed 2018-04-03

Associated revisions

Revision 43a9f0cf (diff)
Added by Reiner Teubner over 2 years ago

[BUGFIX] Fix timestamp handling in QueryGenerator

Since https://review.typo3.org/c/51242/ all hidden
FormEngine fields work with ISO dates but the
QueryGenerator can only handle unix timestamp.
This patch fix the query building process for
timestamp record fields.

Resolves: #83675
Releases: master, 8.7
Change-Id: I79227762c4159984612d86dea640bdfd8b3a2784
Reviewed-on: https://review.typo3.org/55533
Reviewed-by: Tobi Kretschmann <>
Tested-by: TYPO3com <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision 69c6d983 (diff)
Added by Reiner Teubner over 2 years ago

[BUGFIX] Fix timestamp handling in QueryGenerator

Since https://review.typo3.org/c/51242/ all hidden
FormEngine fields work with ISO dates but the
QueryGenerator can only handle unix timestamp.
This patch fix the query building process for
timestamp record fields.

Resolves: #83675
Releases: master, 8.7
Change-Id: I79227762c4159984612d86dea640bdfd8b3a2784
Reviewed-on: https://review.typo3.org/55877
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Reiner Teubner over 2 years ago

  • Status changed from New to In Progress

A deeper look at this show that in QuerGenerator.php:1670 this is going on.

...
    * @param int $timestamp the unix timestamp
...
    $value = ($timestamp > 0 ? strftime($dateFormat, $timestamp) : '');
    // $timestamp == "2018-02-01T14:08:00Z" 
    // $value == 00:33 01-01-1970 
...

With Patch https://review.typo3.org/c/51242/ there is a change Only write ISO dates in UTC back to hidden FormEngine fields so thats the reason why here is a string and not a unix timestamp is given.

#2 Updated by Gerrit Code Review over 2 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#3 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#4 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#5 Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#6 Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#7 Updated by Gerrit Code Review over 2 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#8 Updated by Gerrit Code Review over 2 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#9 Updated by Gerrit Code Review over 2 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55533

#10 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55877

#11 Updated by Reiner Teubner over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#12 Updated by Manuel Selbach over 2 years ago

  • Related to Bug #84588: Int values for field will be converted to unix timestamp in module "DB check" -> Full search added

#13 Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF