The code and data behind xeiaso.net
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

handlers: fix LAST_MODIFIED date format

Closes #463

Signed-off-by: Xe <me@christine.website>

Xe Iaso 5d7daf17 6be8b24d

+19 -1
+19 -1
src/handlers/mod.rs
··· 33 33 } 34 34 } 35 35 36 + fn month_to_name(m: u32) -> &'static str { 37 + match m { 38 + 1 => "Jan", 39 + 2 => "Feb", 40 + 3 => "Mar", 41 + 4 => "Apr", 42 + 5 => "May", 43 + 6 => "Jun", 44 + 7 => "Jul", 45 + 8 => "Aug", 46 + 9 => "Sep", 47 + 10 => "Oct", 48 + 11 => "Nov", 49 + 12 => "Dec", 50 + _ => "Unk", 51 + } 52 + } 53 + 36 54 lazy_static! { 37 55 static ref HIT_COUNTER: IntCounterVec = 38 56 register_int_counter_vec!(opts!("hits", "Number of hits to various pages"), &["page"]) ··· 43 61 "{dayname}, {day} {month} {year} {hour}:{minute}:{second} GMT", 44 62 dayname = weekday_to_name(now.weekday()), 45 63 day = now.day(), 46 - month = now.month(), 64 + month = month_to_name(now.month()), 47 65 year = now.year(), 48 66 hour = now.hour(), 49 67 minute = now.minute(),