Shape 5

Joomla Templates => City Portal - January - Club => : rfarrell June 23, 2009, 07:59:54 PM



: Date display wrong in IE
: rfarrell June 23, 2009, 07:59:54 PM
The date displayed at the top of the site displays correctly for my timezone (Australia) in Firefox but appears to display a US timezone in IE6 and is therefore one day behind (I've not tested other IE versions yet). 

www.xvdg.com

Rod Farrell


: Re: Date display wrong in IE
: jonahh June 24, 2009, 11:10:22 PM
That is very odd.  Only thing I can suggest is checking out the below site where we got the date function from.  Its actually php so I'm not sure how IE or any browser would interrupt it differently as php is server side, not browser.

Look for the below in your index.php file:

:
  <?php echo date("l");?>, <?php echo date("F j, Y");?>

http://us3.php.net/date


: Re: Date display wrong in IE
: ice_man July 25, 2009, 01:50:55 AM
I'm looking at the code and there appears to be two different methods for formatting the date based on the browser.  The code you described is for IE6 broswers only?
:
<?php if ($is_ie6 == "yes") { ?>
<div id="s5_date">
<?php echo date("l");?>, <?php echo date("F j, Y");?>
</div>
<?php ?>

I'm using IE8 and it appears that the code that is formatting the date is as follows:
:
<?php if ($is_ie6 == "no") { ?>
<div class="s5_wrap">
<div id="s5_date">
<?php echo JHTML::_('date''now'JText::_('DATE_FORMAT_LC')) ?>
</div>
</div>
<?php ?>

So in this case, how would I go about formatting the date?  (Month day, year versus day month year)


: Re: Date display wrong in IE
: jonahh July 27, 2009, 12:44:55 PM
Yes that is correct, we applied an update for the Joomla 1.5 versions.  If the IE6 portion is giving you problems copy the:

<?php echo JHTML::_('date', 'now', JText::_('DATE_FORMAT_LC')) ?>

and replace the IE6 php date code.


: Re: Date display wrong in IE
: ice_man July 29, 2009, 06:58:36 PM
It's not giving me any problems in IE6.  It just seems that the only way to format the date is by using the code for IE6.  Is there a way to format the date using the code for other browsers?


: Re: Date display wrong in IE
: jonahh July 30, 2009, 11:47:19 PM
Perhaps try using the IE6 code for all other browsers then?