krz/hn

A brutalist web client for Hacker News.

clone: git clone https://gitbay.org/krz/hn.git

7f0d14fe6fe950ebdbe1fbeffb644d4535680f62

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2023-06-06T02:25:52Z

fix: user comment datetimes used incorrect taf
 index.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.php b/index.php
index 91266ec..f9e74eb 100644
--- a/index.php
+++ b/index.php
@@ -195,9 +195,9 @@ function get_user(string $api_url, string $inline_title) {
 				$html = 'TODO: Add logic to handle polls here.';
 			} else {
 				// TODO: Add link to parent with $sub_response['parent']
-				$html = '<div><timedatetime="' . date('Y-m-d h:m:s', $sub_response['time']);
+				$html = '<div><time datetime="' . date('Y-m-d h:m:s', $sub_response['time']);
 				$html .= '">' . date('Y-m-d h:m:s', $sub_response['time']);
-				$html .= '</time><br><p>' . $sub_response['text']; $html .= '</p></div>';
+				$html .= '</time><br><p>' . $sub_response['text'] . '</p></div>';
 			}
 			$html_output .= $html;
 		}