Lines Matching defs:date
7 * and date_dos2unix for date==0 by Igor Zhbanov(bsg@uniyar.ac.ru)
168 * date: 0 - 4: day (1 - 31)
169 * date: 5 - 8: month (1 - 12)
170 * date: 9 - 15: year (0 - 127) from 1980
197 /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */
201 u16 time = le16_to_cpu(__time), date = le16_to_cpu(__date);
205 year = date >> 9;
206 month = max(1, (date >> 5) & 0xf);
207 day = max(1, date & 0x1f) - 1;
233 /* Convert linear UNIX date to a FAT time/date pair. */
235 __le16 *time, __le16 *date, u8 *time_cs)
243 *date = cpu_to_le16((0 << 9) | (1 << 5) | 1);
250 *date = cpu_to_le16((127 << 9) | (12 << 5) | 31);
264 *date = cpu_to_le16(tm.tm_year << 9 | tm.tm_mon << 5 | tm.tm_mday);