2 Replies - 1981 Views - Last Post: 26 July 2009 - 10:25 AM Rate Topic: -----

#1 Misfit  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 100
  • Joined: 18-July 09

daylight savings time output

Post icon  Posted 25 July 2009 - 10:25 PM

http://thenoob.net

On my site, in the "random info" section, I can't get the output to stop printing 1. The 1 comes from the date (I) part of the code - I was wondering two things about this.

#1. Does DST affect all countries, thus throwing off everything except the US's time by an hour?
#2. Is there a way to make the 1 go away?

<?php
echo "<b>time loaded:</b>\n";
echo date("h:i A I"); // I = DST = 1 in output?

?>


This post has been edited by Misfit: 25 July 2009 - 10:26 PM


Is This A Good Question/Topic? 0
  • +

Replies To: daylight savings time output

#2 Moezzie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 58
  • Joined: 25-November 07

Re: daylight savings time output

Posted 26 July 2009 - 04:55 AM

I think you might have missunderstood the "I" in date(). If you add the "I" as a parameter to date() its going to return eather 1 or 0 depending on if the date is daylight savings(its not going to display the daylight savings time).
Have a look at the reference here:
http://us3.php.net/m...nction.date.php
Was This Post Helpful? 1
  • +
  • -

#3 Misfit  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 100
  • Joined: 18-July 09

Re: daylight savings time output

Posted 26 July 2009 - 10:25 AM

Trying to code things when you hardly know it in the wee hours of the morning is a terrible idea - but thanks a ton. ^^;
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1