diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-09 11:33:46 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-09 11:33:46 +0000 |
commit | 00f97ed41a56f8146a8066db0934b574615b9760 (patch) | |
tree | df09566408ce070dc24021c320008928db5e3c63 /time.c | |
parent | 4eec1b31b90f89101a482600770df1faae041a13 (diff) | |
download | ruby-00f97ed41a56f8146a8066db0934b574615b9760.tar.gz |
* time.c (find_time_t): 24:00 should be the beginning of the next
day even if the leap second, 23:59:60, exists.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2928,6 +2928,7 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp) return NULL; } } + /* Given argument has no corresponding time_t. Let's outerpolation. */ /* * `Seconds Since the Epoch' in SUSv3: @@ -2950,7 +2951,7 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp) tm_lo.tm_yday) * 86400 + (tptr->tm_hour - tm_lo.tm_hour) * 3600 + (tptr->tm_min - tm_lo.tm_min) * 60 + - (tptr->tm_sec - tm_lo.tm_sec); + (tptr->tm_sec - (tm_lo.tm_sec == 60 ? 59 : tm_lo.tm_sec)); return NULL; |