rfc:datetime_and_daylight_saving_time

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:datetime_and_daylight_saving_time [2011/09/15 16:35] – further clarifications and more details danielcrfc:datetime_and_daylight_saving_time [2011/10/10 18:24] – add examples from derick, tweak some wording danielc
Line 1: Line 1:
 ====== Request for Comments: DateTime and Daylight Saving Time Transitions ====== ====== Request for Comments: DateTime and Daylight Saving Time Transitions ======
-  * Version: 0.3 +  * Version: 0.5 
-  * Date: 2011-09-15+  * Date: 2011-10-10
   * Author: Daniel Convissor <danielc@php.net> with feedback from Derick Rethans <derick@php.net>   * Author: Daniel Convissor <danielc@php.net> with feedback from Derick Rethans <derick@php.net>
   * Status: Draft   * Status: Draft
Line 57: Line 57:
 2:00 am.  The forward transition (in spring) jumps to 3:00 am, skipping 2:00 am.  The forward transition (in spring) jumps to 3:00 am, skipping
 over the hour of 2 am.  The backward transition (in fall) jumps back to over the hour of 2 am.  The backward transition (in fall) jumps back to
-1:00 am, repeating the hour of 1am.+1:00 am, repeating the hour of 1 am.
  
 Other time zones use different transition quantities and times. Other time zones use different transition quantities and times.
Line 82: Line 82:
 (between ''1:00:00 am'' and ''1:59:59 am'' Standard Time). (between ''1:00:00 am'' and ''1:59:59 am'' Standard Time).
  
-This RFC proposes adjusting the time string parser to handle strings ending +This RFC proposes adjusting the time string parser to handle strings containing 
-in ''DST'' and ''ST'' When ''DST'' or ''ST'' are not present, PHP will use+''DST'' and ''ST'' When ''DST'' or ''ST'' are not present, PHP will use
 the current behavior, which uses the time zone offset in place at the the current behavior, which uses the time zone offset in place at the
 specified time and uses DST offset during the repeated hour during backward specified time and uses DST offset during the repeated hour during backward
Line 121: Line 121:
 The date format used in this section is for display purposes only, does The date format used in this section is for display purposes only, does
 not correspond to a PHP format, nor is intended to be parsed by PHP. not correspond to a PHP format, nor is intended to be parsed by PHP.
 +
 +Reminder: the time zone in the examples is ''America/New_York''.
 +So "(ST)" represents Eastern Standard Time/EST/-0500 and "(DT)" represents Eastern Daylight Time/EDT/-0400.
  
 The behaviors indicated here are covered by unit tests in ''ext/date/tests'': The behaviors indicated here are covered by unit tests in ''ext/date/tests'':
Line 143: Line 146:
 | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T04:30:00''//(ST)// | P0DT21H  | fd4 | | | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T04:30:00''//(ST)// | P0DT21H  | fd4 | |
 | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T01:30:00''//(ST)// | P1DT0H   | fd5 | | | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T01:30:00''//(ST)// | P1DT0H   | fd5 | |
 +| ''2010-03-14T03:30:00''//(DT)// | ''2010-03-13T03:30:00''//(ST)// | P1DT0H   | fd6 | |
 +| ''2010-03-14T03:30:00''//(DT)// | ''2010-03-13T02:30:00''//(ST)// | P1DT1H   | fd7 | |
  
 == add() == == add() ==
Line 160: Line 165:
 | ''2010-03-14T01:30:00''//(ST)// | PT21H | ''2010-03-13T04:30:00''//(ST)// | fs4 | | | ''2010-03-14T01:30:00''//(ST)// | PT21H | ''2010-03-13T04:30:00''//(ST)// | fs4 | |
 | ''2010-03-14T01:30:00''//(ST)// | P1D   | ''2010-03-13T01:30:00''//(ST)// | fs5 | | | ''2010-03-14T01:30:00''//(ST)// | P1D   | ''2010-03-13T01:30:00''//(ST)// | fs5 | |
 +| ''2010-03-15T03:30:00''//(DT)// | P1D   | ''2010-03-14T03:30:00''//(DT)// | fs6 | |
 +| ''2010-03-15T02:30:00''//(DT)// | P1D   | ''2010-03-14T03:30:00''//(DT)// | fs7 | |
  
 === Zone Types 1 & 2 === === Zone Types 1 & 2 ===
Line 169: Line 176:
 | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T04:30:00''//(ST)// | P0DT21H  | fd4 | | | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T04:30:00''//(ST)// | P0DT21H  | fd4 | |
 | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T01:30:00''//(ST)// | P1DT0H   | fd5 | | | ''2010-03-14T01:30:00''//(ST)// | ''2010-03-13T01:30:00''//(ST)// | P1DT0H   | fd5 | |
 +| ''2010-03-14T03:30:00''//(DT)// | ''2010-03-13T03:30:00''//(ST)// | P0DT23H  | fd6 | |
 +| ''2010-03-14T03:30:00''//(DT)// | ''2010-03-13T02:30:00''//(ST)// | P1DT0H   | fd7 | |
  
 == add() == == add() ==
Line 186: Line 195:
 | ''2010-03-14T01:30:00''//(ST)// | PT21H | ''2010-03-13T04:30:00''//(ST)// | fs4 | N/A | | ''2010-03-14T01:30:00''//(ST)// | PT21H | ''2010-03-13T04:30:00''//(ST)// | fs4 | N/A |
 | ''2010-03-14T01:30:00''//(ST)// | P1D   | ''2010-03-13T01:30:00''//(ST)// | fs5 | N/A | | ''2010-03-14T01:30:00''//(ST)// | P1D   | ''2010-03-13T01:30:00''//(ST)// | fs5 | N/A |
 +| ''2010-03-15T03:30:00''//(DT)// | P1D   | ''2010-03-14T03:30:00''//(DT)// | fs6 | N/A |
 +| ''2010-03-15T02:30:00''//(DT)// | P1D   | ''2010-03-14T02:30:00''//(DT)// | fs7 | N/A |
  
 ==== Backward Transitions ==== ==== Backward Transitions ====
Line 210: Line 221:
 | ''2010-11-06T01:30:00''//(DT)// | P1D    | ''2010-11-07T01:30:00''//(DT)// | ba7 | | | ''2010-11-06T01:30:00''//(DT)// | P1D    | ''2010-11-07T01:30:00''//(DT)// | ba7 | |
 | ''2010-11-06T01:30:00''//(DT)// | P1DT1H | ''2010-11-07T01:30:00''//(ST)// | ba8 | ''2010-11-07T02:30:00''//(ST)// | | ''2010-11-06T01:30:00''//(DT)// | P1DT1H | ''2010-11-07T01:30:00''//(ST)// | ba8 | ''2010-11-07T02:30:00''//(ST)// |
 +| ''2010-11-06T04:30:00''//(DT)// | PT25H  | ''2010-11-07T04:30:00''//(ST)// | ba9 | ''2010-11-07T05:30:00''//(ST)// |
 +| ''2010-11-06T03:30:00''//(DT)// | P1D    | ''2010-11-07T03:30:00''//(ST)// | ba10| |
 +| ''2010-11-06T02:30:00''//(DT)// | P1D    | ''2010-11-07T02:30:00''//(ST)// | ba11| |
  
 == sub() == == sub() ==
Line 221: Line 235:
 | ''2010-11-07T01:30:00''//(DT)// | P1D    | ''2010-11-06T01:30:00''//(DT)// | bs7 | | | ''2010-11-07T01:30:00''//(DT)// | P1D    | ''2010-11-06T01:30:00''//(DT)// | bs7 | |
 | ''2010-11-07T01:30:00''//(ST)// | P1DT1H | ''2010-11-06T01:30:00''//(DT)// | bs8 | ''2010-11-06T00:30:00''//(DT)// | | ''2010-11-07T01:30:00''//(ST)// | P1DT1H | ''2010-11-06T01:30:00''//(DT)// | bs8 | ''2010-11-06T00:30:00''//(DT)// |
 +| ''2010-11-07T03:30:00''//(ST)// | P1D    | ''2010-11-06T03:30:00''//(DT)// | bs9 | |
 +| ''2010-11-07T02:30:00''//(ST)// | P1D    | ''2010-11-06T02:30:00''//(DT)// | bs10 | |
  
 === Zone Types 1 & 2 === === Zone Types 1 & 2 ===
Line 244: Line 260:
 | ''2010-11-06T01:30:00''//(DT)// | P1D    | ''2010-11-07T01:30:00''//(DT)// | ba7 | N/A | | ''2010-11-06T01:30:00''//(DT)// | P1D    | ''2010-11-07T01:30:00''//(DT)// | ba7 | N/A |
 | ''2010-11-06T01:30:00''//(DT)// | P1DT1H | ''2010-11-07T02:30:00''//(DT)// | ba8 | N/A | | ''2010-11-06T01:30:00''//(DT)// | P1DT1H | ''2010-11-07T02:30:00''//(DT)// | ba8 | N/A |
 +| ''2010-11-06T04:30:00''//(DT)// | PT25H  | ''2010-11-07T05:30:00''//(DT)// | ba9 | N/A |
 +| ''2010-11-06T03:30:00''//(DT)// | P1D    | ''2010-11-07T03:30:00''//(DT)// | ba10| N/A |
 +| ''2010-11-06T02:30:00''//(DT)// | P1D    | ''2010-11-07T02:30:00''//(DT)// | ba11| N/A |
  
 == sub() == == sub() ==
Line 255: Line 274:
 | ''2010-11-07T01:30:00''//(DT)// | P1D    | ''2010-11-06T01:30:00''//(DT)// | bs7 | N/A | | ''2010-11-07T01:30:00''//(DT)// | P1D    | ''2010-11-06T01:30:00''//(DT)// | bs7 | N/A |
 | ''2010-11-07T01:30:00''//(ST)// | P1DT1H | ''2010-11-06T01:30:00''//(ST)// | bs8 | N/A | | ''2010-11-07T01:30:00''//(ST)// | P1DT1H | ''2010-11-06T01:30:00''//(ST)// | bs8 | N/A |
 +| ''2010-11-07T03:30:00''//(ST)// | P1D    | ''2010-11-06T03:30:00''//(ST)// | bs9 | N/A |
 +| ''2010-11-07T02:30:00''//(ST)// | P1D    | ''2010-11-06T02:30:00''//(ST)// | bs10 | N/A |
  
  
rfc/datetime_and_daylight_saving_time.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1