Skip to content

Commit

Permalink
fix deprecated usage of strftime
Browse files Browse the repository at this point in the history
  • Loading branch information
mudhoney committed Nov 18, 2024
1 parent eb28c04 commit 0710d77
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docroot/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,13 @@ function printHTMLErrorMsg($msg) {
<html lang="en">
<head>
<?php
$meta = "<!-- DATE: %s URL: http://%s%s -->\n";
printf($meta, strftime('%Y-%m-%d %H:%m:%S'), $_SERVER['HTTP_HOST'],
$_SERVER['REQUEST_URI']);
// Find out http or https
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';

// Debug information
$meta = "<!-- DATE: %s URL: $protocol://%s%s -->\n";
printf($meta, date('Y-m-d H:m:s'), $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']);

?>
<title>Helioviewer.org API - Error</title>
<link rel="stylesheet" type="text/css" href="<?php echo HV_WEB_ROOT_URL; ?>/docs/css/bootstrap-theme.min.css">
Expand Down

0 comments on commit 0710d77

Please sign in to comment.