Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision f004318f62a18ba5e2e6a83ad09211972e561d18)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision e5fbe066054e93e9a6a849b87265928c4280b64b)
@@ -90,5 +90,5 @@
     ipc_callid_t callid, ipc_call_t *call);
 static int rtc_dev_remove(ddf_dev_t *dev);
-static int rtc_tm_sanity_check(struct tm *t);
+static int rtc_tm_sanity_check(struct tm *t, int epoch);
 static void rtc_register_write(rtc_t *rtc, int reg, int data);
 static bool is_leap_year(int year);
@@ -287,4 +287,5 @@
 	bool bcd_mode;
 	bool pm_mode = false;
+	int  epoch = 1900;
 	rtc_t *rtc = RTC_FROM_FNODE(fun);
 
@@ -348,7 +349,8 @@
 
 	if (t->tm_year < 100) {
-		/* tm_year is the number of years since 1900, it is not
-		 * possible it is < 100.
+		/* tm_year is the number of years since 1900 but the
+		 * RTC epoch is 2000.
 		 */
+		epoch = 2000;
 		t->tm_year += 100;
 	}
@@ -356,5 +358,5 @@
 	fibril_mutex_unlock(&rtc->mutex);
 
-	return rtc_tm_sanity_check(t);
+	return rtc_tm_sanity_check(t, epoch);
 }
 
@@ -373,13 +375,22 @@
 	int  reg_b;
 	int  reg_a;
+	int  epoch;
 	rtc_t *rtc = RTC_FROM_FNODE(fun);
 
-	rc = rtc_tm_sanity_check(t);
-	if (rc != EOK)
+	fibril_mutex_lock(&rtc->mutex);
+
+	/* Detect the RTC epoch */
+	if (rtc_register_read(rtc, RTC_YEAR) < 100)
+		epoch = 2000;
+	else
+		epoch = 1900;
+
+	rc = rtc_tm_sanity_check(t, epoch);
+	if (rc != EOK) {
+		fibril_mutex_unlock(&rtc->mutex);
 		return rc;
+	}
 
 	t->tm_mon++; /* counts from 1, not from 0 */
-
-	fibril_mutex_lock(&rtc->mutex);
 
 	reg_b = rtc_register_read(rtc, RTC_STATUS_B);
@@ -435,9 +446,10 @@
  *
  * @param t     The tm structure to check
+ * @param epoch The RTC epoch year
  *
  * @return      EOK on success or EINVAL
  */
 static int
-rtc_tm_sanity_check(struct tm *t)
+rtc_tm_sanity_check(struct tm *t, int epoch)
 {
 	int ndays;
@@ -453,4 +465,6 @@
 	else if (t->tm_mon < 0 || t->tm_mon > 11)
 		return EINVAL;
+	else if (epoch == 2000 && t->tm_year < 100)
+		return EINVAL;
 	else if (t->tm_year < 0)
 		return EINVAL;
