Permalink
Browse files

add a datetime stamp for the rss entry

  • Loading branch information...
1 parent 3af4d81 commit 8d160aff9c513bc676f737210f56e5a51487fbec @lukec lukec committed Dec 15, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 vhsapi/lib/VHSAPI.pm
View
@@ -37,10 +37,14 @@ get '/s/:spacename/data/:dataname/feed' => sub {
link => 'http://api.hackspace.ca',
description => "Datapoint information",
);
+ my $w3c = DateTime::Format::W3CDTF->new;
rss->add_item(
title => $dp->name . " is " . $dp->value,
link => $dp->url,
description => $space->title . " datapoint '@{[$dp->name]}' is now '@{[$dp->value]}' as of @{[$dp->datetime]}.",
+ dc => {
+ date => $w3c->format_datetime($dp->datetime),
+ },
);
rss_output;
};

0 comments on commit 8d160af

Please sign in to comment.