There are two problems with this approach.<div><br></div><div>Firstly, date() does not account for user timezones. You could use Drupal&#39;s format_date() function instead. It works similarly. <a href="http://api.drupal.org/api/drupal/includes--common.inc/function/format_date">http://api.drupal.org/api/drupal/includes--common.inc/function/format_date</a></div>
<div><br></div><div>Secondly, this is incompatible with caching. You could use JavaScript to get around this problem. On a somewhat related note, you can also use JavaScript to show relative date information, similar to this approach <a href="http://37signals.com/svn/posts/1557-javascript-makes-relative-times-compatible-with-caching">http://37signals.com/svn/posts/1557-javascript-makes-relative-times-compatible-with-caching</a> (In this example, I&#39;d recommend using HTML 5 data attributes. See <a href="http://ejohn.org/blog/html-5-data-attributes/">http://ejohn.org/blog/html-5-data-attributes/</a> for more information.)</div>
<div><div><br></div><font color="#333333">Carl Wiedemann</font><div><div><font color="#333333">Website design and development consulting</font></div><div><font color="#333333"><a href="mailto:carl.wiedemann@gmail.com" target="_blank">carl.wiedemann@gmail.com</a> | skype: c4rlww</font></div>
</div><br>
<br><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 9:19 PM, Cory Gilliam <span dir="ltr">&lt;<a href="mailto:imaaxa@gmail.com">imaaxa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey Jim,<br><br>If you want it hard coded into the site add this line to your page.tpl.php for your theme:<br><br>&lt;?php print date(&#39;l, F j, Y g:i a T&#39;) ?&gt;<br><br>This will print the date time like: Sunday September 18, 2011 5:15 am EST. If you want to tweek the way the time and date display, go to <a href="http://us.php.net/manual/en/function.date.php" target="_blank">http://us.php.net/manual/en/function.date.php</a> for a list of date / time parts and examples. So you can theme the date and time, you can wrap this in html tags like so:<br>

<br>&lt;div id=&quot;myTimeAndDate&quot; class=&quot;myTimeAndDate&quot;&gt;<br>  &lt;?php print date(&#39;l, F j, Y g:i a T&#39;) ?&gt;<br>&lt;/div&gt;<br><br>Hope this helps,<br>Cory<br><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 6:30 PM, Jim Ruby <span dir="ltr">&lt;<a href="mailto:jim@v-community.com" target="_blank">jim@v-community.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would like to display current date and time, what would be the best way to<br>
do this in drupal 7? I would like to display either the local time pst or<br>
the users that is visiting their local time. These would be anonymous<br>
visitors.<br>
<br>
Thanks.<br>
<br>
Follow me on:<br>
Twitter: <a href="http://twitter.com/1rubytweets" target="_blank">http://twitter.com/1rubytweets</a><br>
Facebook: <a href="http://www.facebook.com/profile.php?id=1058306793" target="_blank">http://www.facebook.com/profile.php?id=1058306793</a><br>
Join me on:<br>
Yahoo: jruby6767<br>
Msn: <a href="mailto:jruby@charter.net" target="_blank">jruby@charter.net</a><br>
<font color="#888888"><br>
<br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Cory Gilliam<br>
Knoxville, TN 37921<br><a href="mailto:imaaxa@gmail.com" target="_blank">imaaxa@gmail.com</a><br>
<a href="tel:865.335.3250" value="+18653353250" target="_blank">865.335.3250</a><br><br><br>
</font><br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br></div>