Searched refs:year (Results 1 - 25 of 113) sorted by relevance

12345

/linux-master/arch/mips/include/asm/mach-rm/
H A Dmc146818rtc.h14 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
16 #define mc146818_decode_year(year) ((year) + 1980)
/linux-master/arch/mips/include/asm/mach-generic/
H A Dmc146818rtc.h33 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
/linux-master/kernel/time/
H A Dtime_test.c7 * Traditional implementation of leap year evaluation.
9 static bool is_leap(long year) argument
11 return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
17 static int last_day_of_month(long year, int month) argument
20 return 28 + is_leap(year);
29 static void advance_date(long *year, int *month, int *mday, int *yday) argument
31 if (*mday != last_day_of_month(*year, *month)) {
46 ++*year;
61 long year = 1970 - 80000; local
[all...]
H A Dtimeconv.c50 u64 u64tmp, udays, century, year; local
80 * (fictitious) calendar where the year starts in March, month = 2
82 * mathematically convenient because the day of the year does not
83 * depend on whether the year is leap or not. For instance:
85 * March 1st 0-th day of the year;
87 * April 1st 31-st day of the year;
89 * January 1st 306-th day of the year; (Important!)
91 * February 28th 364-th day of the year;
92 * February 29th 365-th day of the year (if it exists).
116 year
[all...]
/linux-master/arch/mips/include/asm/mach-malta/
H A Dmc146818rtc.h34 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
/linux-master/fs/isofs/
H A Dutil.c21 int year, month, day, hour, minute, second, tz; local
24 year = p[0];
33 if (year < 0) {
36 crtime = mktime64(year+1900, month, day, hour, minute, second);
/linux-master/arch/mips/include/asm/mach-jazz/
H A Dmc146818rtc.h36 #define mc146818_decode_year(year) ((year) + 1980)
/linux-master/drivers/rtc/
H A Dlib_test.c9 static void advance_date(int *year, int *month, int *mday, int *yday) argument
11 if (*mday != rtc_month_days(*month - 1, *year)) {
26 ++*year;
42 int year = 1970; local
58 year, month, mday, yday, days
60 KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG);
65 advance_date(&year, &month, &mday, &yday);
H A Dlib.c30 int rtc_month_days(unsigned int month, unsigned int year) argument
32 return rtc_days_in_month[month] + (is_leap_year(year) && month == 1);
39 int rtc_year_days(unsigned int day, unsigned int month, unsigned int year) argument
41 return rtc_ydays[is_leap_year(year)][month] + day - 1;
58 u32 u32tmp, udays, century, day_of_century, year_of_century, year, local
71 * (fictitious) calendar where the year starts in March, month = 2
73 * mathematically convenient because the day of the year does not
74 * depend on whether the year is leap or not. For instance:
76 * March 1st 0-th day of the year;
78 * April 1st 31-st day of the year;
[all...]
H A Drtc-pcf8583.c175 unsigned char ctrl, year[2]; local
178 .nr = sizeof(year),
179 .data = year
202 real_year = year[0];
205 * The RTC year holds the LSB two bits of the current
206 * year, which should reflect the LSB two bits of the
207 * CMOS copy of the year. Any difference indicates
213 * RTC year wrapped. Adjust it appropriately.
217 tm->tm_year = (real_year + year_offset + year[1] * 100) - 1900;
225 unsigned char year[ local
[all...]
H A Drtc-efi.c24 * returns day of the year [0-365]
30 return rtc_year_days(eft->day, eft->month - 1, eft->year);
39 int ndays = eft->year * (365 % 7)
40 + (eft->year - 1) / 4
41 - (eft->year - 1) / 100
42 + (eft->year - 1) / 400
55 eft->year = wtime->tm_year + 1900;
91 if (eft->year < 1900 || eft->year > 9999)
93 wtime->tm_year = eft->year
[all...]
H A Drtc-wilco-ec.c43 * @year: Year value (full year % 100)
44 * @century: Century value (full year / 100)
55 u8 year; member in struct:ec_rtc_read_response
64 * @century: Century value (full year / 100)
65 * @year: Year value (full year % 100)
80 u8 year; member in struct:ec_rtc_write_request
112 tm->tm_year = rtc.year + (rtc.century * 100) - 1900;
128 int year local
[all...]
H A Drtc-rtd119x.c49 static inline int rtd119x_rtc_days_in_year(int year) argument
51 return 365 + (is_leap_year(year) ? 1 : 0);
87 unsigned int year; local
108 year = data->base_year;
109 while (day >= rtd119x_rtc_days_in_year(year)) {
110 day -= rtd119x_rtc_days_in_year(year);
111 year++;
113 tm->tm_year = year - 1900;
117 while (day >= rtc_month_days(tm->tm_mon, year)) {
118 day -= rtc_month_days(tm->tm_mon, year);
[all...]
H A Drtc-aspeed.c25 unsigned int cent, year; local
44 year = (reg2 >> 8) & 0x7f;
46 tm->tm_year = year + (cent * 100) - 1900;
57 int year, cent; local
60 year = tm->tm_year % 100;
65 reg2 = ((cent & 0x1f) << 16) | ((year & 0x7f) << 8) |
/linux-master/arch/alpha/kernel/
H A Drtc.c51 int epoch, year, ctrl; local
60 year = CMOS_READ(RTC_YEAR);
62 year = bcd2bin(year);
64 /* PC-like is standard; used for year >= 70 */
66 if (year < 20) {
68 } else if (year >= 20 && year < 48) {
71 } else if (year >= 48 && year < 7
94 int year = tm->tm_year; local
[all...]
/linux-master/arch/m68k/sun3x/
H A Dtime.h16 volatile unsigned char year; member in struct:mostek_dt
/linux-master/arch/mips/include/asm/
H A Dmc146818-time.h91 unsigned int year, mon, day, hour, min, sec; local
102 year = CMOS_READ(RTC_YEAR);
111 year = bcd2bin(year);
114 year = mc146818_decode_year(year);
116 return mktime64(year, mon, day, hour, min, sec);
/linux-master/arch/mips/dec/
H A Dtime.c24 unsigned int year, mon, day, hour, min, sec, real_year; local
35 year = CMOS_READ(RTC_YEAR);
37 * The PROM will reset the year to either '72 or '73.
38 * Therefore we store the real year separately, in one
52 year = bcd2bin(year);
55 year += real_year - 72 + 2000;
57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec);
/linux-master/fs/udf/
H A Dudftime.c33 u16 year = le16_to_cpu(src.year); local
46 dest->tv_sec = mktime64(year, src.month, src.day, src.hour, src.minute,
76 dest->year = cpu_to_le16(tm.tm_year + 1900);
/linux-master/arch/powerpc/platforms/chrp/
H A Dtime.c132 unsigned int year, mon, day, hour, min, sec; local
140 year = chrp_cmos_clock_read(RTC_YEAR);
149 year = bcd2bin(year);
151 if (year < 70)
152 year += 100;
158 tm->tm_year = year;
/linux-master/arch/m68k/atari/
H A Dtime.c144 int hour, year; local
172 year = t->tm_year - 80;
173 val.year_ones = year % 10;
174 val.year_tens = year / 10;
178 val.year_ones = (year % 4); /* leap year register */
203 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; local
219 year = t->tm_year - atari_rtc_year_offset;
238 year = bin2bcd(year);
[all...]
/linux-master/arch/m68k/include/asm/
H A Dintersil.h35 unsigned char year; member in struct:intersil_dt
/linux-master/arch/m68k/sun3/
H A Dintersil.c47 todintersil->year = (t->tm_year - 68) % 100;
57 t->tm_year = todintersil->year + 68;
/linux-master/arch/powerpc/platforms/maple/
H A Dtime.c80 int sec, min, hour, mon, mday, year; local
97 year = tm->tm_year;
105 year = bin2bcd(year);
112 maple_clock_write(year, RTC_YEAR);
/linux-master/arch/sh/boards/mach-sh03/
H A Drtc.c43 unsigned int year, mon, day, hour, min, sec; local
53 year = (__raw_readb(RTC_YEA1) & 0xf) + (__raw_readb(RTC_YEA10) & 0xf) * 10
57 if (year == 0 || mon < 1 || mon > 12 || day > 31 || day < 1 ||
61 printk("year=%d, mon=%d, day=%d, hour=%d, min=%d, sec=%d\n",
62 year, mon, day, hour, min, sec);
84 tm->tm_year = year - 1900;

Completed in 216 milliseconds

12345