Index: uspace/lib/c/include/sys/time.h
===================================================================
--- uspace/lib/c/include/sys/time.h	(revision 86e81a9a91c48ea3711d4810e4fafeefd9e73e14)
+++ uspace/lib/c/include/sys/time.h	(revision 4cade47017997947d6e015f12a23f1bc853644fa)
@@ -1,4 +1,6 @@
 /*
  * Copyright (c) 2006 Ondrej Palkovsky
+ * Copyright (c) 2011 Petr Koupy
+ * Copyright (c) 2011 Jiri Zarevucky
  * All rights reserved.
  *
@@ -47,10 +49,13 @@
 
 struct tm {
-	int tm_sec;       /* 0 - 59 */
-	int tm_min;       /* 0 - 59 */
-	int tm_hour;      /* 0 - 23 */
-	int tm_mday;      /* 1 - 31 */
-	int tm_mon;       /* 0 - 11 */
-	int tm_year;      /* years since 1900 */
+	int tm_sec;         /* Seconds [0,60]. */
+	int tm_min;         /* Minutes [0,59]. */
+	int tm_hour;        /* Hour [0,23]. */
+	int tm_mday;        /* Day of month [1,31]. */
+	int tm_mon;         /* Month of year [0,11]. */
+	int tm_year;        /* Years since 1900. */
+	int tm_wday;        /* Day of week [0,6] (Sunday = 0). */
+	int tm_yday;        /* Day of year [0,365]. */
+	int tm_isdst;       /* Daylight Savings flag. */
 };
 
Index: uspace/lib/posix/time.c
===================================================================
--- uspace/lib/posix/time.c	(revision 86e81a9a91c48ea3711d4810e4fafeefd9e73e14)
+++ uspace/lib/posix/time.c	(revision 4cade47017997947d6e015f12a23f1bc853644fa)
@@ -200,5 +200,5 @@
  * @return Number of seconds since the epoch, not counting leap seconds.
  */
-static time_t _secs_since_epoch(const struct posix_tm *tm)
+static time_t _secs_since_epoch(const struct tm *tm)
 {
 	return _days_since_epoch(tm->tm_year, tm->tm_mon, tm->tm_mday) *
@@ -229,5 +229,5 @@
  * @return 0 on success, -1 on overflow
  */
-static int _normalize_time(struct posix_tm *tm, time_t sec_add)
+static int _normalize_time(struct tm *tm, time_t sec_add)
 {
 	// TODO: DST correction
@@ -324,5 +324,5 @@
  * @return Week-based year.
  */
-static int _wbyear(const struct posix_tm *tm)
+static int _wbyear(const struct tm *tm)
 {
 	int day = tm->tm_yday - _wbyear_offset(tm->tm_year);
@@ -347,5 +347,5 @@
  * @return The week number (0 - 53).
  */
-static int _sun_week_number(const struct posix_tm *tm)
+static int _sun_week_number(const struct tm *tm)
 {
 	int first_day = (7 - _day_of_week(tm->tm_year, 0, 1)) % 7;
@@ -363,5 +363,5 @@
  * @return The week number (1 - 53).
  */
-static int _iso_week_number(const struct posix_tm *tm)
+static int _iso_week_number(const struct tm *tm)
 {
 	int day = tm->tm_yday - _wbyear_offset(tm->tm_year);
@@ -386,5 +386,5 @@
  * @return The week number (0 - 53).
  */
-static int _mon_week_number(const struct posix_tm *tm)
+static int _mon_week_number(const struct tm *tm)
 {
 	int first_day = (1 - _day_of_week(tm->tm_year, 0, 1)) % 7;
@@ -430,5 +430,5 @@
  * @return time_t representation of the time, undefined value on overflow.
  */
-time_t posix_mktime(struct posix_tm *tm)
+time_t posix_mktime(struct tm *tm)
 {
 	// TODO: take DST flag into account
@@ -445,9 +445,9 @@
  * @return Normalized broken-down time in UTC, NULL on overflow.
  */
-struct posix_tm *posix_gmtime(const time_t *timer)
+struct tm *posix_gmtime(const time_t *timer)
 {
 	assert(timer != NULL);
 
-	static struct posix_tm result;
+	static struct tm result;
 	return posix_gmtime_r(timer, &result);
 }
@@ -460,6 +460,6 @@
  * @return Value of result on success, NULL on overflow.
  */
-struct posix_tm *posix_gmtime_r(const time_t *restrict timer,
-    struct posix_tm *restrict result)
+struct tm *posix_gmtime_r(const time_t *restrict timer,
+    struct tm *restrict result)
 {
 	assert(timer != NULL);
@@ -488,7 +488,7 @@
  * @return Normalized broken-down time in local timezone, NULL on overflow.
  */
-struct posix_tm *posix_localtime(const time_t *timer)
-{
-	static struct posix_tm result;
+struct tm *posix_localtime(const time_t *timer)
+{
+	static struct tm result;
 	return posix_localtime_r(timer, &result);
 }
@@ -501,6 +501,6 @@
  * @return Value of result on success, NULL on overflow.
  */
-struct posix_tm *posix_localtime_r(const time_t *restrict timer,
-    struct posix_tm *restrict result)
+struct tm *posix_localtime_r(const time_t *restrict timer,
+    struct tm *restrict result)
 {
 	// TODO: deal with timezone
@@ -516,5 +516,5 @@
  * @return Pointer to a statically allocated string.
  */
-char *posix_asctime(const struct posix_tm *timeptr)
+char *posix_asctime(const struct tm *timeptr)
 {
 	static char buf[ASCTIME_BUF_LEN];
@@ -531,5 +531,5 @@
  * @return Value of buf.
  */
-char *posix_asctime_r(const struct posix_tm *restrict timeptr,
+char *posix_asctime_r(const struct tm *restrict timeptr,
     char *restrict buf)
 {
@@ -563,5 +563,5 @@
 char *posix_ctime(const time_t *timer)
 {
-	struct posix_tm *loctime = posix_localtime(timer);
+	struct tm *loctime = posix_localtime(timer);
 	if (loctime == NULL) {
 		return NULL;
@@ -580,5 +580,5 @@
 char *posix_ctime_r(const time_t *timer, char *buf)
 {
-	struct posix_tm loctime;
+	struct tm loctime;
 	if (posix_localtime_r(timer, &loctime) == NULL) {
 		return NULL;
@@ -598,5 +598,5 @@
  */
 size_t posix_strftime(char *restrict s, size_t maxsize,
-    const char *restrict format, const struct posix_tm *restrict tm)
+    const char *restrict format, const struct tm *restrict tm)
 {
 	assert(s != NULL);
Index: uspace/lib/posix/time.h
===================================================================
--- uspace/lib/posix/time.h	(revision 86e81a9a91c48ea3711d4810e4fafeefd9e73e14)
+++ uspace/lib/posix/time.h	(revision 4cade47017997947d6e015f12a23f1bc853644fa)
@@ -69,16 +69,4 @@
 #define CLOCK_REALTIME ((posix_clockid_t) 0)
 
-struct posix_tm {
-	int tm_sec;         /* Seconds [0,60]. */
-	int tm_min;         /* Minutes [0,59]. */
-	int tm_hour;        /* Hour [0,23]. */
-	int tm_mday;        /* Day of month [1,31]. */
-	int tm_mon;         /* Month of year [0,11]. */
-	int tm_year;        /* Years since 1900. */
-	int tm_wday;        /* Day of week [0,6] (Sunday = 0). */
-	int tm_yday;        /* Day of year [0,365]. */
-	int tm_isdst;       /* Daylight Savings flag. */
-};
-
 struct posix_timespec {
 	time_t tv_sec; /* Seconds. */
@@ -103,20 +91,20 @@
 
 /* Broken-down Time */
-extern time_t posix_mktime(struct posix_tm *tm);
-extern struct posix_tm *posix_gmtime(const time_t *timer);
-extern struct posix_tm *posix_gmtime_r(const time_t *restrict timer,
-    struct posix_tm *restrict result);
-extern struct posix_tm *posix_localtime(const time_t *timer);
-extern struct posix_tm *posix_localtime_r(const time_t *restrict timer,
-    struct posix_tm *restrict result);
+extern time_t posix_mktime(struct tm *tm);
+extern struct tm *posix_gmtime(const time_t *timer);
+extern struct tm *posix_gmtime_r(const time_t *restrict timer,
+    struct tm *restrict result);
+extern struct tm *posix_localtime(const time_t *timer);
+extern struct tm *posix_localtime_r(const time_t *restrict timer,
+    struct tm *restrict result);
 
 /* Formatting Calendar Time */
-extern char *posix_asctime(const struct posix_tm *timeptr);
-extern char *posix_asctime_r(const struct posix_tm *restrict timeptr,
+extern char *posix_asctime(const struct tm *timeptr);
+extern char *posix_asctime_r(const struct tm *restrict timeptr,
     char *restrict buf);
 extern char *posix_ctime(const time_t *timer);
 extern char *posix_ctime_r(const time_t *timer, char *buf);
 extern size_t posix_strftime(char *restrict s, size_t maxsize,
-    const char *restrict format, const struct posix_tm *restrict tm);
+    const char *restrict format, const struct tm *restrict tm);
 
 /* Clocks */
@@ -134,5 +122,4 @@
 
 #ifndef LIBPOSIX_INTERNAL
-	#define tm posix_tm
 	#define timespec posix_timespec
 	#define itimerspec posix_itimerspec
