[PATCH v4 0/2] Add function to convert between calendar time andbroken-down time for universal use

From: Zhaolei
Date: Thu Jul 30 2009 - 01:36:49 EST


Hello, Andrew

This is Patch v4.
I updated this patch bases on Ogawa-san's suggestion.

Changelog v3->v4:
1: Use long instead of int for tm.tm_year to avoid overflow
2: Remove localtime() and gmtime() because they can't support timezone
database as user-more. And rename __offtime() to time_to_tm()
3: Use time_t instead of __kernel_time_t as function's argument type
4: __isleap(unsigned int year)->__isleap(long year) to avoid overflow

Changelog v2->v3:
Using a struct to save year/mon/.../yday.

Changelog v1->v2:
1: Fix "no tabs" error caused by email client.
2: Remove explicit 'inline' in __isleap()
3: Move DIV() and LEAPS_THRU_END_OF(y) into regular C function along with
comment
4: Move gmtime() and localtime() into header file.

Thanks
Zhaolei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/