* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <ctype.h>
#include <time.h>
+#include "cache.h"
+
static time_t my_mktime(struct tm *tm)
{
static const int mdays[] = {
int minutes;
minutes = tz < 0 ? -tz : tz;
- minutes = (tz / 100)*60 + (tz % 100);
+ minutes = (minutes / 100)*60 + (minutes % 100);
minutes = tz < 0 ? -minutes : minutes;
- t = time - minutes * 60;
+ t = time + minutes * 60;
tm = gmtime(&t);
if (!tm)
return NULL;