Forum Support

Shape 5
March 28, 2024, 10:29:37 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Date display wrong in IE  (Read 507 times)
rfarrell
Jr. Member
**
Offline Offline

Posts: 156



« on: 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
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #1 on: 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:

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

http://us3.php.net/date
Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
ice_man
Jr. Member
**
Offline Offline

Posts: 3



« Reply #2 on: 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?
Code:
<?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:
Code:
<?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)
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #3 on: 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.
Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
ice_man
Jr. Member
**
Offline Offline

Posts: 3



« Reply #4 on: 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?
Logged
jonahh
Administrator
*****
Offline Offline

Posts: 23789



WWW
« Reply #5 on: July 30, 2009, 11:47:19 PM »

Perhaps try using the IE6 code for all other browsers then?
Logged

Jonah Hall
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.