Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
e35e4cbd
Commit
e35e4cbd
authored
19 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
fixed date format for google sitemaps
darcs-hash:20051127110118-7ad00-691b4d529004ef0571896c3d326361970a584409.gz
parent
8b9da5a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/exe/indexer.php
+16
-1
16 additions, 1 deletion
lib/exe/indexer.php
with
16 additions
and
1 deletion
lib/exe/indexer.php
+
16
−
1
View file @
e35e4cbd
...
...
@@ -113,7 +113,7 @@ function runSitemapper(){
print
' <url>'
.
NL
;
print
' <loc>'
.
wl
(
$id
,
''
,
true
)
.
'</loc>'
.
NL
;
print
' <lastmod>'
.
date
(
'Y-m-d\TH:i:s'
,
$date
)
.
'</lastmod>'
.
NL
;
print
' <lastmod>'
.
date
_iso8601
(
$date
)
.
'</lastmod>'
.
NL
;
print
' </url>'
.
NL
;
}
print
'</urlset>'
.
NL
;
...
...
@@ -125,6 +125,21 @@ function runSitemapper(){
return
true
;
}
/**
* Formats a timestamp as ISO 8601 date
*
* @author <ungu at terong dot com>
* @link http://www.php.net/manual/en/function.date.php#54072
*/
function
date_iso8601
(
$int_date
)
{
//$int_date: current date in UNIX timestamp
$date_mod
=
date
(
'Y-m-d\TH:i:s'
,
$int_date
);
$pre_timezone
=
date
(
'O'
,
$int_date
);
$time_zone
=
substr
(
$pre_timezone
,
0
,
3
)
.
":"
.
substr
(
$pre_timezone
,
3
,
2
);
$date_mod
.
=
$time_zone
;
return
$date_mod
;
}
/**
* Just send a 1x1 pixel blank gif to the browser
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment