Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\timeconv.c Create Date:2022-07-28 10:44:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:me64_to_tm - converts the calendar time to local broken-down time*@totalsecs the number of seconds elapsed since 00:00:00 on January 1, 1970,* Coordinated Universal Time (UTC)

Proto:void time64_to_tm(time64_t totalsecs, int offset, struct tm *result)

Type:void

Parameter:

TypeParameterName
time64_ttotalsecs
intoffset
struct tm *result
84  days = div_s64_rem - signed 64bit divide with 64bit divisor and remainder*@dividend: 64bit dividend*@divisor: 64bit divisor*@remainder: 64bit remainder
85  rem = remainder
86  rem += offset
87  When rem < 0 cycle
88  rem += SECS_PER_DAY
89  --days
91  When rem >= SECS_PER_DAY cycle
92  rem -= SECS_PER_DAY
93  ++days
96  he number of hours past midnight, in the range 0 to 23 = rem / SECS_PER_HOUR
97  rem %= SECS_PER_HOUR
98  he number of minutes after the hour, in the range 0 to 59 = rem / 60
99  he number of seconds after the minute, normally in the range* 0 to 59, but can be up to 60 to allow for leap seconds = rem % 60
102  he number of days since Sunday, in the range 0 to 6 = (4 + days) % 7
103  If he number of days since Sunday, in the range 0 to 6 < 0 Then he number of days since Sunday, in the range 0 to 6 += 7
106  y = 1970
108  When days < 0 || days >= If Nonzero if YEAR is a leap year (every 4 years,* except every 100th isn't, and every 400th is). Then 366 Else 365 cycle
110  yg = y + do a mathdiv for long type
113  days -= (yg - y) * 365 + How many leap years between y1 and y2, y1 must less or equal to y2
114  y = yg
117  he number of years since 1900 = y - 1900
119  he number of days since January 1, in the range 0 to 365 = days
121  ip = How many days come before each month (0-12). [Nonzero if YEAR is a leap year (every 4 years,* except every 100th isn't, and every 400th is).]
122  When days < ip[y] cycle Continue
124  days -= ip[y]
126  he number of months since January, in the range 0 to 11 = y
127  he day of the month, in the range 1 to 31 = days + 1
Caller
NameDescribe
kdb_summarykdb_summary - This function implements the 'summary' command.