Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
*** ext/date/lib/unixtime2tm.c~ 2019-08-28 12:01:15.000000000 +0900
--- ext/date/lib/unixtime2tm.c 2019-12-11 20:37:52.000000000 +0900
***************
*** 56,61 ****
--- 56,67 ----
cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
}
+ printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year);
+ if (ts >= 0 && tmp_days == 0) {
+ cur_year -= YEARS_PER_LYEAR_PERIOD;
+ tmp_days += DAYS_PER_LYEAR_PERIOD;
+ }
+ printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year);
TIMELIB_DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year););
if (ts >= 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.