Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the date format in the RSS/ATOM/OPML feeds #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ISSUES
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
* Root /search page doesn't do anything
* Atom feed sucks shit (see t/atom.t)
* OPML & RSS & Atom Feed dates incorrect format
* Gitweb compat URIs are borked - there were some I just wholesale ripped out. Put back..
* Sort out commitdiff so conflicted merges have an equivalent display to gitweb (d7f39bebabeb31ce9a7b4f1b6f3db9f391b78c3e as a reference)
* Need to sanitise the input ...
Expand Down
1 change: 1 addition & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ requires 'Git::PurePerl' => '0.47';
requires 'aliased';
requires 'CGI';
requires 'DateTime';
requires 'DateTime::Format::Mail';
requires 'File::Copy::Recursive';
requires 'File::Type';
requires 'File::Type::WebImages';
Expand Down
3 changes: 2 additions & 1 deletion lib/Gitalist/Controller/OPML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package Gitalist::Controller::OPML;
use Moose;
use Moose::Autobox;
use DateTime;
use DateTime::Format::Mail;
use Sys::Hostname qw/hostname/;

use namespace::autoclean;
Expand All @@ -15,7 +16,7 @@ sub opml : Chained('/base') Args(0) {
$c->stash(
title => lc(hostname()) . ' - ' . blessed($c)->config->{name},
Repositories => $c->model()->repositories,
now => DateTime->now,
now => DateTime::Format::Mail->format_datetime( DateTime->now ),
template => 'opml.tt2',
no_wrapper => 1,
);
Expand Down
8 changes: 4 additions & 4 deletions lib/Gitalist/Controller/Repository.pm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package Gitalist::Controller::Repository;
use Moose;
use Sys::Hostname qw/hostname/;
use DateTime::Format::Mail;
use namespace::autoclean;

BEGIN { extends 'Gitalist::Controller' }
with 'Gitalist::URIStructure::Repository';

Expand Down Expand Up @@ -66,7 +66,7 @@ sub atom : Chained('find') Does('FilenameArgs') Args() {
my $host = lc hostname();
$c->stash(
title => $host . ' - ' . Gitalist->config->{name},
updated => DateTime->now
updated => DateTime::Format::Mail->format_datetime( DateTime->now() )
);

my $repository = $c->stash->{Repository};
Expand Down Expand Up @@ -107,8 +107,8 @@ sub rss : Chained('find') Does('FilenameArgs') Args() {
$c->stash(
title => lc(Sys::Hostname::hostname()) . ' - ' . Gitalist->config->{name},
language => 'en',
pubDate => DateTime->now,
lastBuildDate => DateTime->now,
pubDate => DateTime::Format::Mail->format_datetime( DateTime->now() ),
lastBuildDate => DateTime::Format::Mail->format_datetime( DateTime->now() ),
no_wrapper => 1,
);

Expand Down