diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-12 16:45:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-12 16:45:02 +0000 |
commit | 8507904385e86d4ce2c913e11e86ea5b71267fdc (patch) | |
tree | 6dbdb9e3f0163244d791c8958af48f1dcedd4a29 /time.c | |
parent | 25c79f446d8bccbb88b5ba98817054f5a12a8c47 (diff) |
timegm_noleapsecond uses calc_tm_yday.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -2671,11 +2671,7 @@ static time_t timegm_noleapsecond(struct tm *tm) { long tm_year = tm->tm_year; - int tm_yday = tm->tm_mday; - if (leap_year_p(tm_year + 1900)) - tm_yday += leap_year_yday_offset[tm->tm_mon]; - else - tm_yday += common_year_yday_offset[tm->tm_mon]; + int tm_yday = calc_tm_yday(tm->tm_year, tm->tm_mon, tm->tm_mday); /* * `Seconds Since the Epoch' in SUSv3: |