Server Date

print t('<p>The date generated from PHP code to see what date the host server thinks it is.<p><p><p>');
print date("Y-m-d H:i:s O ");
$timestamp = (string) time();
print t('Timestamp is '.$timestamp);

PHP code like this used to work dropped right into a Drupal page. So I had a page to see if my hosting server knew what the %$&* time it was. With Drupal version 8, security and caching have killed the ability to drop in arbitrary code.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
  • Only images hosted on this site may be used in <img> tags.
  • You can align images (data-align="center"), but also videos, blockquotes, and so on.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.