PHP and daylight saving time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mkneze@gmail.com

    #1

    PHP and daylight saving time

    Hi guys,

    Is it somehow possible to disable DST in date() function? I am
    currently in UTC+1 timezone which has DST enabled but data i am
    processing are throughout the year in UTC+1 without DST. So, how can i
    disable automatic DST processing of date() function?

    Thanks in advance!
  • Erwin Moller

    #2
    Re: PHP and daylight saving time

    mkneze@gmail.co m wrote:
    Hi guys,
    >
    Is it somehow possible to disable DST in date() function? I am
    currently in UTC+1 timezone which has DST enabled but data i am
    processing are throughout the year in UTC+1 without DST. So, how can i
    disable automatic DST processing of date() function?
    >
    Thanks in advance!
    Hi,

    Not 100% sure, but isn't this function made for that?
    date_default_ti mezone_set()



    PHP5 and higher only.
    Read the usercontributed notes for hints/links to solution in PHP4

    Hope that helps.

    Regards,
    Erwin Moller

    Comment

    • Erwin Moller

      #3
      Re: PHP and daylight saving time

      Erwin Moller wrote:
      mkneze@gmail.co m wrote:
      >Hi guys,
      >>
      >Is it somehow possible to disable DST in date() function? I am
      >currently in UTC+1 timezone which has DST enabled but data i am
      >processing are throughout the year in UTC+1 without DST. So, how can i
      >disable automatic DST processing of date() function?
      >>
      >Thanks in advance!
      >
      Hi,
      >
      Not 100% sure, but isn't this function made for that?
      date_default_ti mezone_set()
      >
      addition: feed it 'Europe/London' for offset 0.
      I think. ;-)

      Be sure to test before believing me. :P

      Erwin

      >
      PHP5 and higher only.
      Read the usercontributed notes for hints/links to solution in PHP4
      >
      Hope that helps.
      >
      Regards,
      Erwin Moller

      Comment

      • C. (http://symcbean.blogspot.com/)

        #4
        Re: PHP and daylight saving time

        On 23 Nov, 12:17, Erwin Moller
        <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
        >
        addition: feed it 'Europe/London' for offset 0.
        I think. ;-)
        >
        Be sure to test before believing me. :P
        >
        I'm not actually in London but we have daylight savings time in the UK
        (only its called 'BST' for British Summer Time to differentiate from
        the movable feasts celebrated in other countries ;).

        Try using 'GMT' or 'Zulu' or 'UTC'

        C.



        Comment

        • Toby A Inkster

          #5
          Re: PHP and daylight saving time

          Erwin Moller wrote:
          addition: feed it 'Europe/London' for offset 0.
          I think. ;-)
          London observes daylight saving.

          'UTC' might be better.

          --
          Toby A Inkster BSc (Hons) ARCS
          [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
          [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 17:39.]

          It'll be in the Last Place You Look

          Comment

          • Robin

            #6
            Re: PHP and daylight saving time

            mkneze@gmail.co m wrote:
            Hi guys,
            >
            Is it somehow possible to disable DST in date() function? I am
            currently in UTC+1 timezone which has DST enabled but data i am
            processing are throughout the year in UTC+1 without DST. So, how can i
            disable automatic DST processing of date() function?
            >
            Thanks in advance!
            What about using gmdate() and adding an hour?

            Comment

            • Rik Wasmus

              #7
              Re: PHP and daylight saving time

              On Fri, 23 Nov 2007 14:09:32 +0100, C. (http://symcbean.blogspot.com/)
              <colin.mckinnon @gmail.comwrote :
              On 23 Nov, 12:17, Erwin Moller
              <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
              >>
              >addition: feed it 'Europe/London' for offset 0.
              >I think. ;-)
              >>
              >Be sure to test before believing me. :P
              >>
              >
              I'm not actually in London but we have daylight savings time in the UK
              (only its called 'BST' for British Summer Time to differentiate from
              the movable feasts celebrated in other countries ;).
              Well, it's the UK after all. No matter how you adjust your time, seeing
              'daylight' is more dependant on the rare absence of clouds :P
              --
              Rik Wasmus

              Comment

              • Toby A Inkster

                #8
                Re: PHP and daylight saving time

                Rik Wasmus wrote:
                Well, it's the UK after all. No matter how you adjust your time, seeing
                'daylight' is more dependant on the rare absence of clouds :P
                It was nice and sunny for me today. Freezing cold, sure, but clear blue
                skies.

                --
                Toby A Inkster BSc (Hons) ARCS
                [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
                [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 1 day, 12 min.]

                It'll be in the Last Place You Look

                Comment

                Working...