You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function date_limit_format (file core/includes/date.inc) is used to return format strings for given granularities. As it doesn't take literals into account, this can lead to strange formats.
Sorry for the short report, I can provide more information, if requested.
This behavior can get reproduced via UI (custom date formats), but for readability I provide some code examples with their result as comment:
$foo = date_limit_format('e Ymd H:iO', array('timezone'));// "eO"
$foo = date_limit_format('d m Y H:i:s xxx', array('year', 'month', 'day'));// "d m Y xxx"
$foo = date_limit_format('Ymd - H:i:00 \O', array('year'));// "Y :00 \O"
OK, the first example doesn't use literal characters, but the problem is related.
A timezone formatted with "eO" (tz name plus offset) isn't really usable.
Example 2 and 3 use literal characters and these appear in every format. That's probably not the expected output. At least I wouldn't expect it.
Literal characters should of course be part of a full formatted date, but shouldn't get added to every date part.
I'm not sure how to resolve this. For now I'd not recommend to use literal characters or more than one timezone char in custom date formats.
The text was updated successfully, but these errors were encountered:
Description of the bug
function date_limit_format (file core/includes/date.inc) is used to return format strings for given granularities. As it doesn't take literals into account, this can lead to strange formats.
Sorry for the short report, I can provide more information, if requested.
This behavior can get reproduced via UI (custom date formats), but for readability I provide some code examples with their result as comment:
OK, the first example doesn't use literal characters, but the problem is related.
A timezone formatted with "eO" (tz name plus offset) isn't really usable.
Example 2 and 3 use literal characters and these appear in every format. That's probably not the expected output. At least I wouldn't expect it.
Literal characters should of course be part of a full formatted date, but shouldn't get added to every date part.
I'm not sure how to resolve this. For now I'd not recommend to use literal characters or more than one timezone char in custom date formats.
The text was updated successfully, but these errors were encountered: