File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
mod blogs;
2
2
mod posts;
3
3
4
+ use chrono:: Timelike ;
4
5
use crate :: blogs:: Blog ;
5
6
use crate :: posts:: Post ;
6
7
use handlebars:: { handlebars_helper, Handlebars } ;
@@ -162,7 +163,7 @@ impl<'a> Generator<'a> {
162
163
let data = json ! ( {
163
164
"blog" : blog,
164
165
"posts" : posts,
165
- "feed_updated" : chrono:: Utc :: now( ) . to_rfc3339( ) ,
166
+ "feed_updated" : chrono:: Utc :: now( ) . with_nanosecond ( 0 ) . unwrap ( ) . to_rfc3339( ) ,
166
167
} ) ;
167
168
168
169
self . render_template ( blog. prefix ( ) . join ( "feed.xml" ) , "feed" , data) ?;
@@ -185,7 +186,7 @@ impl<'a> Generator<'a> {
185
186
. collect ( ) ;
186
187
let data = Releases {
187
188
releases : releases,
188
- feed_updated : chrono:: Utc :: now ( ) . to_rfc3339 ( ) ,
189
+ feed_updated : chrono:: Utc :: now ( ) . with_nanosecond ( 0 ) . unwrap ( ) . to_rfc3339 ( ) ,
189
190
} ;
190
191
fs:: write (
191
192
self . out_directory . join ( blog. prefix ( ) ) . join ( "releases.json" ) ,
You can’t perform that action at this time.
0 commit comments