Project

General

Profile

Actions

Bug #76453

closed

CONTENT select where with operator "<="

Added by Johannes C. Laxander almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2016-06-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

myRecords = CONTENT
myRecords {
table = mytable
select {
pidInList = 3
orderBy = datum1
selectFields = title,datum1
where = datum1 > UNIX_TIMESTAMP("2016-06-01 00:00:00") AND datum1 <= UNIX_TIMESTAMP("2016-06-24 00:00:00")
}
}

The typoscript code above doesn't working properly.
The query should find a record which datum1 field has a value of "1466726400" (2016-06-24 00:00:00 UTC 0).
But the result is: no record found!?

Then I've change the second condition in the where clause from "<=" to "<" and the date from the 24th to the 25th:
where = datum1 >= UNIX_TIMESTAMP("2016-06-24 00:00:00") AND datum1 < UNIX_TIMESTAMP("2016-06-25 00:00:00")
This query find the corresponding record!

Also this query with ">=" ist working properly.
where = datum1 >= UNIX_TIMESTAMP("2016-06-24 00:00:00") AND datum1 < UNIX_TIMESTAMP("2016-07-01 00:00:00")

Why does the operator "<=" not working properly? I've no explanation for it.

Actions #1

Updated by Johannes C. Laxander almost 8 years ago

Sorry, it is no Problem with Operator "<=".

The value of UNIX_TIMESTAMP("2016-06-24 00:00:00") considered the server time zone and so I get in my case a value in utc +2 format.

Actions #2

Updated by Morton Jonuschat almost 8 years ago

  • Status changed from New to Closed

Not a TYPO3/TypoScript problem according to issue reporter.

Actions

Also available in: Atom PDF