Re: [PATCH 1/2] Add function to convert between calendar time and broken-down time for universal use
From: Zhaolei
Date: Sun Jul 19 2009 - 22:43:48 EST
* From: "Andi Kleen" <andi@xxxxxxxxxxxxxx>
>> +
>> +static void __offtime(__kernel_time_t totalsecs, int offset,
>> + unsigned int *year, unsigned int *mon, unsigned int *mday,
>> + unsigned int *hour, unsigned int *min, unsigned int *sec,
>> + unsigned int *wday, unsigned int *yday)
>> +{
>> + long days, rem, y;
>> + const unsigned short *ip;
>> +
>> + days = totalsecs / SECS_PER_DAY;
>
> Does this handle leap seconds? Doesn't seem to.
Hello, Andi
Thank for your attention.
It seems that we don't need to deal with leap seconds in conversion because
unix time is not counting leap seconds..
There is some detail in http://en.wikipedia.org/wiki/Unix_time
Thanks
Zhaolei
N?§²æìr¸?yúè?Øb²X¬¶Ç§vØ^?)Þº{.nÇ+?·¥?{±?êçzX§¶?¡Ü¨}©?²Æ zÚ&j:+v?¨¾«?êçzZ+?Ê+zf£¢·h??§~??Ûiÿûàz¹®w¥¢¸??¨èÚ&¢)ߢf?ù^jÇ«y§m?á@A«a¶Úÿ0¶ìh®å?i