📄 ctime.3
字号:
10 R(\(5\)-format)421 4443 A4900(\256le)S5065(from)S3552 V1080(which)S1355(to)S1462(read)S1665(the)S1817(time)S(conversion)441 2026 A2497(information;)S3030(if)S10 B3122(TZ)S10 R3286(appears)S3624(and)S3799(begins)S4091(with)S4300(a)S4375(character)S4776(other)S5013(than)S5216(a)S3672 V1080(slash,)S1338(it's)S1499(used)S1715(as)S1831(a)S1908(pathname)S2331(relative)S2666(to)S2776(the)S2931(system)S3242(time)S(conversion)441 3452 A3924(information)S4430(directory,)S4850(de\256ned)S5177(as)S3792 V10 B1080(TZDIR)S10 R1430(in)S1539(the)S1693(include)S2020(\256le)S10 B2180(tz\256le.h)S10 R2469(.)S2550(If)S2649(this)S2825(\256le)S2985(fails)S3190(for)S3339(any)S3515(reason,)S3834(the)S3988(GMT)S4243(offset)S4504(as)S4619(provided)S5007(by)S5138(the)S3912 V1080(kernel)S1364(is)S1463(used,)S1704(as)S1820(described)S(above.)265 2238 A2560(If)S2660(this)S2837(fails)S3043(for)S3193(any)S3370(reason,)S3690(GMT)S3946(is)S4045(used.)S4311(See)S10 B4489(TZ)S10 R4623(\(5\))S4773(for)S4922(a)S4998(proper)S4032 V1080(description)S1552(of)S1661(the)S10 B1809(TZ)S10 R1968(variable.)S4200 V10 B1080(Ctime)S10 R(converts)341 1371 A1739(a)S1811(time)S2017(value,)S2287(pointed)S2615(to)S2720(by)S10 I2847(clock)S10 R3060(,)S3112(such)S3323(as)S3434(returned)S3797(by)S10 B3924(time)S10 R4115(\(2\))S4260(into)S4443(ASCII)S4735(and)S4908(returns)S5216(a)S4320 V1080(pointer)S1390(to)S1493(a)S1563(26-character)S2093(string)S2347(in)S2450(the)S2598(following)S3014(form.)S3285(All)S3439(the)S3587(\256elds)S3830(have)S4045(constant)S4405(width.)S4488 V1440(Sun)S1621(Sep)S1797(16)S1922(01:03:52)S(1973\\n\\0)356 2303 A4656 V10 B1080(Localtime)S10 R1556(and)S10 B1746(gmtime)S10 R2116(return)S2402(pointers)S2772(to)S2896(structures)S3334(containing)S3804(the)S3973(broken-down)S4555(time.)S10 B4830(Localtime)S4776 V10 R1080(corrects)S1427(for)S1572(the)S1722(time)S1927(zone)S2143(and)S2314(possible)S2669(daylight)S3024(savings)S3351(time;)S10 B3584(gmtime)S10 R(converts)341 3935 A4302(directly)S4636(to)S4740(GMT,)S5015(which)S4896 V1080(is)S1176(the)S1328(time)S1536(UNIX)S1818(uses.)S10 B2070(Asctime)S10 R(converts)341 2447 A2817(a)S2892(broken-down)S3458(time)S3667(to)S3775(ASCII)S4069(and)S4244(returns)S4554(a)S4629(pointer)S4944(to)S5052(a)S5127(26-)S5016 V1080(character)S1476(string.)S5184 V1080(The)S1262(structure)S1640(declaration)S2113(from)S2334(the)S2482(include)S2803(\256le)S2957(is:)S5352 V1440(struct)S1689(tm)S1820({)S5472 V1800(int)S1931(tm_sec;)S2487(/*)S2590(0-59)S(seconds)318 2874 A3217(*/)S5592 V1800(int)S1931(tm_min;)S2487(/*)S2590(0-59)S2874(minutes)S3217(*/)S5712 V1800(int)S(tm_hour;)368 1931 A2487(/*)S2590(0-23)S(hour)184 2874 A3083(*/)S5832 V1800(int)S1931(tm_mday;)S2487(/*)S2590(1-31)S2874(day)S3044(of)S3153(month)S3434(*/)S5952 V1800(int)S1931(tm_mon;)S2487(/*)S2590(0-11)S2874(month)S3155(*/)S6072 V1800(int)S1931(tm_year;)S2487(/*)S2590(0-)S2874(year)S10 R-13073(-)S10 R(1900)200 3155 A3380(*/)S6192 V1800(int)S1931(tm_wday;)S2487(/*)S2590(0-6)S2874(day)S3044(of)S3153(week)S(\(Sunday)335 3391 A3751(=)S3833(0\))S3942(*/)S6312 V1800(int)S(tm_yday;)379 1931 A2487(/*)S(0-365)234 2590 A2874(day)S3044(of)S3153(year)S3352(*/)S6432 V1800(int)S1931(tm_isdst;)S2487(/*)S2590(\257ag:)S2874(daylight)S3228(savings)S3554(time)S3758(in)S3861(effect)S4117(*/)S6552 V(long)178 1800 A2003(tm_gmtoff;)S2487(/*)S2590(offset)S2845(from)S3066(GMT)S3315(in)S(seconds)318 3418 A3761(*/)S6672 V1800(char)S1999(**tm_zone;)S2487(/*)S2590(abbreviation)S3118(of)S3227(timezone)S3621(name)S3864(*/)S6792 V1440(};)S6960 V10 B1080(Tm_isdst)S10 R1502(is)S(non-zero)358 1594 A1977(if)S2064(a)S2134(time)S2338(zone)S2553(adjustment)S3019(such)S3228(as)S3337(Daylight)S3714(Savings)S4057(time)S4261(is)S4353(in)S4456(effect.)S7128 V10 B1080(Tm_gmtoff)S10 R1597(is)S1694(the)S1847(offset)S2107(\(in)S(seconds\))352 2249 A2631(of)S2745(the)S2898(time)S3107(represented)S3602(from)S3828(GMT,)S4107(with)S(positive)318 4316 A4665(values)S4953(indicat-)S7248 V1080(ing)S1233(East)S1432(of)S1541(Greenwich.)S7903 V720(Page)S941(1)S2679(\()S2721(April)S2959(2,)S(1987)200 3059 A3267(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R720(CTIME)S1042(\()S1084(3)S1142(\))S2696(Eighth)S(Edition)296 2989 A4805(CTIME)S5127(\()S5169(3)S5227(\))S960 V9 R720(F)S722(FI)S774(IL)S807(LE)S865(ES)S923(S)S1080 V10 R(/usr/lib/zoneinfo)665 1080 A1845(time)S2049(zone)S2264(information)S2764(directory)S1200 V(/etc/localtime)549 1080 A1845(local)S2066(time)S2270(zone)S2485(\256le)S1368 V9 R720(S)S722(SE)S774(EE)S832(E)S928(A)S930(AL)S998(LS)S1056(SO)S1108(O)S1488 V10 B1080(time)S10 R1271(\(2\),)S10 B1439(getenv)S10 R1719(\(3\),)S10 B1887(tz\256le)S10 R2095(\(5\),)S10 B2263(TZ)S10 R2397(\(5\),)S10 B2565(environ)S10 R2895(\(7\),)S10 B3063(zic)S10 R3181(\(8\).)S1656 V9 R720(N)S722(NO)S790(OT)S858(TE)S916(E)S1776 V10 R1080(The)S1262(return)S1528(values)S1811(point)S2043(to)S2147(static)S2386(data)S2580(whose)S2863(content)S3185(is)S(overwritten)465 3278 A3769(by)S(each)185 3895 A4106(call.)S4328(The)S10 B4511(tm_zone)S10 R4901(\256eld)S5106(of)S5216(a)S1896 V1080(returned)S10 B1446(struct)S1729(tm)S10 R1877(points)S2152(to)S2259(a)S2333(static)S2575(array)S2812(of)S2925(characters,)S3389(which)S(will)157 3664 A3850(also)S4041(be)S(overwritten)465 4165 A4659(at)S4761(the)S4913(next)S5115(call)S2016 V1080(\(and)S1284(by)S1409(calls)S1619(to)S10 B1722(tzset)S10 R1919(\).)S7903 V720(September)S1176(13,)S(1996)200 1326 A2679(\()S2721(April)S2959(2,)S(1987)200 3059 A3267(\))S4990(Page)S5211(2)S8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -