View | Details | Raw Unified | Return to bug 15968 | Differences between
and this patch

Collapse All | Expand All

(-)a/ChangeLog (+9 lines)
Lines 1-5 Link Here
1
2013-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1
2013-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2
2
3
	Support TZ transition times < 00:00:00.
4
	This is needed for version-3 tz-format files; it supports time
5
	stamps past 2037 for America/Godthab (the only entry in the tz
6
	database for which this change is relevant).
7
	* manual/time.texi (TZ Variable): Document transition times
8
	from -167:59:59 through -00:00:01.
9
	* time/tzset.c (tz_rule): Time of day is now signed.
10
	(__tzset_parse_tz): Parse negative time of day.
11
3
	Document TZ transition times >= 25:00:00.
12
	Document TZ transition times >= 25:00:00.
4
	* manual/time.texi (TZ Variable): Document transition times from
13
	* manual/time.texi (TZ Variable): Document transition times from
5
	25:00:00 through 167:59:59.  These are already supported, and this
14
	25:00:00 through 167:59:59.  These are already supported, and this
(-)a/manual/time.texi (-1 / +11 lines)
Lines 2083-2089 between @code{1} and @code{12}. Link Here
2083
The @var{time} fields specify when, in the local time currently in
2083
The @var{time} fields specify when, in the local time currently in
2084
effect, the change to the other time occurs.  If omitted, the default is
2084
effect, the change to the other time occurs.  If omitted, the default is
2085
@code{02:00:00}.  The hours part of the time fields can range from
2085
@code{02:00:00}.  The hours part of the time fields can range from
2086
0 through 167; this is an extension to POSIX.1, which allows
2086
@minus{}167 through 167; this is an extension to POSIX.1, which allows
2087
only the range 0 through 24.
2087
only the range 0 through 24.
2088
2088
2089
Here are some example @code{TZ} values, including the appropriate
2089
Here are some example @code{TZ} values, including the appropriate
Lines 2119-2124 is a placeholder. Link Here
2119
WART4WARST,J1/0,J365/25
2119
WART4WARST,J1/0,J365/25
2120
@end smallexample
2120
@end smallexample
2121
2121
2122
Western Greenland Time (WGT) and Western Greenland Summer Time (WGST)
2123
are 3 hours behind UTC in the winter.  Its clocks follow the European
2124
Union rules of springing forward by one hour on March's last Sunday at
2125
01:00 UTC (@minus{}02:00 local time) and falling back on October's
2126
last Sunday at 01:00 UTC (@minus{}01:00 local time).
2127
2128
@smallexample
2129
WGT3WGST,M3.5.0/-2,M10.5.0/-1
2130
@end smallexample
2131
2122
The schedule of Daylight Saving Time in any particular jurisdiction has
2132
The schedule of Daylight Saving Time in any particular jurisdiction has
2123
changed over the years.  To be strictly correct, the conversion of dates
2133
changed over the years.  To be strictly correct, the conversion of dates
2124
and times in the past should be based on the schedule that was in effect
2134
and times in the past should be based on the schedule that was in effect
(-)a/time/tzset.c (-3 / +5 lines)
Lines 54-60 typedef struct Link Here
54
    /* When to change.  */
54
    /* When to change.  */
55
    enum { J0, J1, M } type;	/* Interpretation of:  */
55
    enum { J0, J1, M } type;	/* Interpretation of:  */
56
    unsigned short int m, n, d;	/* Month, week, day.  */
56
    unsigned short int m, n, d;	/* Month, week, day.  */
57
    unsigned int secs;		/* Time of day.  */
57
    int secs;			/* Time of day.  */
58
58
59
    long int offset;		/* Seconds east of GMT (west if < 0).  */
59
    long int offset;		/* Seconds east of GMT (west if < 0).  */
60
60
Lines 362-370 __tzset_parse_tz (tz) Link Here
362
      else if (*tz == '/')
362
      else if (*tz == '/')
363
	{
363
	{
364
	  /* Get the time of day of the change.  */
364
	  /* Get the time of day of the change.  */
365
	  int negative;
365
	  ++tz;
366
	  ++tz;
366
	  if (*tz == '\0')
367
	  if (*tz == '\0')
367
	    goto out;
368
	    goto out;
369
	  negative = *tz == '-';
370
	  tz += negative;
368
	  consumed = 0;
371
	  consumed = 0;
369
	  switch (sscanf (tz, "%hu%n:%hu%n:%hu%n",
372
	  switch (sscanf (tz, "%hu%n:%hu%n:%hu%n",
370
			  &hh, &consumed, &mm, &consumed, &ss, &consumed))
373
			  &hh, &consumed, &mm, &consumed, &ss, &consumed))
Lines 379-385 __tzset_parse_tz (tz) Link Here
379
	      break;
382
	      break;
380
	    }
383
	    }
381
	  tz += consumed;
384
	  tz += consumed;
382
	  tzr->secs = (hh * 60 * 60) + (mm * 60) + ss;
385
	  tzr->secs = (negative ? -1 : 1) * ((hh * 60 * 60) + (mm * 60) + ss);
383
	}
386
	}
384
      else
387
      else
385
	/* Default to 2:00 AM.  */
388
	/* Default to 2:00 AM.  */
386
- 

Return to bug 15968