[support] question about drupal 7

Cory Gilliam imaaxa at gmail.com
Tue Sep 20 03:19:33 UTC 2011


Hey Jim,

If you want it hard coded into the site add this line to your page.tpl.php
for your theme:

<?php print date('l, F j, Y g:i a T') ?>

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
http://us.php.net/manual/en/function.date.php 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:

<div id="myTimeAndDate" class="myTimeAndDate">
  <?php print date('l, F j, Y g:i a T') ?>
</div>

Hope this helps,
Cory

On Mon, Sep 19, 2011 at 6:30 PM, Jim Ruby <jim at v-community.com> wrote:

> I would like to display current date and time, what would be the best way
> to
> do this in drupal 7? I would like to display either the local time pst or
> the users that is visiting their local time. These would be anonymous
> visitors.
>
> Thanks.
>
> Follow me on:
> Twitter: http://twitter.com/1rubytweets
> Facebook: http://www.facebook.com/profile.php?id=1058306793
> Join me on:
> Yahoo: jruby6767
> Msn: jruby at charter.net
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Cory Gilliam
Knoxville, TN 37921
imaaxa at gmail.com
865.335.3250
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110919/10fec4e5/attachment.html 


More information about the support mailing list