summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--time.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/time.c b/time.c
index f6ce437..46f5d92 100644
--- a/time.c
+++ b/time.c
@@ -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: