summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/strptime.c4
-rw-r--r--time/tzset.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/time/strptime.c b/time/strptime.c
index 4e91a719ac..30b015620d 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -543,7 +543,9 @@ strptime_internal (buf, format, tm, decided)
case 'y':
/* Match year within century. */
get_number (0, 99);
- tm->tm_year = val >= 50 ? val : val + 100;
+ /* The "Year 2000 :The Millennium Rollover" paper suggests that
+ values in the range 69-99 refer to the twentieth century. */
+ tm->tm_year = val >= 69 ? val : val + 100;
break;
case 'Y':
/* Match year including century number. */
diff --git a/time/tzset.c b/time/tzset.c
index 385e7f7633..0793027de7 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -548,7 +548,7 @@ tz_compute (timer, tm)
return 0;
__daylight = timer >= tz_rules[0].change && timer < tz_rules[1].change;
- __timezone = -tz_rules[__daylight ? 1 : 0].offset;
+ __timezone = -tz_rules[__daylight].offset;
__tzname[0] = (char *) tz_rules[0].name;
__tzname[1] = (char *) tz_rules[1].name;
@@ -629,7 +629,7 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp)
{
tp->tm_isdst = __daylight;
tp->tm_zone = __tzname[__daylight];
- tp->tm_gmtoff = __timezone;
+ tp->tm_gmtoff = -__timezone;
}
else
{