diff options
author | Andreas Schwab <schwab@suse.de> | 2013-02-05 14:40:39 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2013-06-05 10:33:02 +0200 |
commit | 840e2943e8ae020adfa7eafa7877f004e7ecada1 (patch) | |
tree | 182c81013a8f79d541a1c01c95a695ffdfb9dd66 /time/strptime_l.c | |
parent | 4c60cb0c8329dd498e9cce3735e5ee6212ad28f4 (diff) | |
download | glibc-840e2943e8ae020adfa7eafa7877f004e7ecada1.tar.gz glibc-840e2943e8ae020adfa7eafa7877f004e7ecada1.tar.xz glibc-840e2943e8ae020adfa7eafa7877f004e7ecada1.zip |
Properly handle %W in strptime
Diffstat (limited to 'time/strptime_l.c')
-rw-r--r-- | time/strptime_l.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/time/strptime_l.c b/time/strptime_l.c index 1f2e8b622f..00fc1ef594 100644 --- a/time/strptime_l.c +++ b/time/strptime_l.c @@ -1180,8 +1180,8 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) if (!s.have_yday) tm->tm_yday = ((7 - (tm->tm_wday - w_offset)) % 7 - + (s.week_no - 1) *7 - + save_wday - w_offset); + + (s.week_no - 1) * 7 + + (save_wday - w_offset + 7) % 7); if (!s.have_mday || !s.have_mon) { |