Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
310
Merge Requests
310
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
6a95a002
Commit
6a95a002
authored
Dec 03, 2004
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#7058
by Neil: format_date does not properly handle escaped characters.
parent
d3fb126d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
includes/common.inc
includes/common.inc
+6
-1
No files found.
includes/common.inc
View file @
6a95a002
...
...
@@ -789,7 +789,9 @@ function format_interval($timestamp, $granularity = 2) {
* The format to use. Can be "small", "medium" or "large" for the preconfigured
* date formats. If "custom" is specified, then $format is required as well.
* @param $format
* A PHP date format string as required by date().
* A PHP date format string as required by date(). A backslash should be used
* before a character to avoid interpreting the character as part of a date
* format.
* @param $timezone
* Time zone offset in seconds; if omitted, the user's time zone is used.
* @return
...
...
@@ -842,6 +844,9 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
else
if
(
$c
==
'Z'
)
{
$date
.
=
$timezone
;
}
else
if
(
$c
==
'\\'
)
{
$date
.
=
$format
[
++
$i
];
}
else
{
$date
.
=
$c
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment