--- ../../coreutils-5.2.0/lib/getdate.y	2003-09-10 06:23:06.000000000 +0000
+++ getdate.y	2004-04-05 07:42:21.000000000 +0000
@@ -672,16 +672,67 @@
   return year;
 }
 
+/*
+   0 if couldn't find TZ to set
+   1 if set OK
+ */
+static int
+set_TZ(const char* value)
+{
+  static char tmp_tz[256];
+  if (value == NULL) {
+    /* will clear from environment */
+    snprintf(tmp_tz,sizeof(tmp_tz),"TZ");
+  } else {
+    snprintf(tmp_tz,sizeof(tmp_tz),"TZ=%s",value);
+  }
+  putenv(tmp_tz);
+  tzset();
+    if (tzname[1][0])
+    return 1;
+  else
+    return 0;
+}
+
+/*
+   0 if couldn't find TZ
+   1 if OK
+ */
+static int
+tz_to_minutes(const char* tz, int* minutes)
+{
+  int ret=0;
+  char* old_tz=getenv("TZ");
+  ret=set_TZ(tz);
+  *minutes = (int) -timezone/60;
+  set_TZ(old_tz);
+  return ret;
+}
+
 static table const *
 lookup_zone (parser_control const *pc, char const *name)
 {
   table const *tp;
+  static table system_time_zone_table[] =
+  {
+    { "", tZONE, 0 }, /* to be filled in at runtime */
+    { 0, 0, 0  }
+  };
 
   /* Try local zone abbreviations first; they're more likely to be right.  */
-  for (tp = pc->local_time_zone_table; tp->name; tp++)
+  for (tp = pc->local_time_zone_table; tp->name; tp++) {
     if (strcmp (name, tp->name) == 0)
       return tp;
+  }
 
+  /* Try to lookup zone in system next */
+  if (tz_to_minutes(name, &system_time_zone_table[0].value)) {
+    tp = system_time_zone_table;
+    tp->name = name;
+    return tp;
+  }
+
+  /* Try internal timezone abbreviations */
   for (tp = time_zone_table; tp->name; tp++)
     if (strcmp (name, tp->name) == 0)
       return tp;
@@ -726,6 +777,9 @@
   int i;
   int abbrev;
 
+  if ((tp = lookup_zone (pc, word)))
+    return tp;
+
   /* Make it uppercase.  */
   for (p = word; *p; p++)
     if (ISLOWER ((unsigned char) *p))
@@ -827,7 +881,7 @@
 
       if (ISALPHA (c))
 	{
-	  char buff[20];
+	  char buff[256];
 	  char *p = buff;
 	  table const *tp;
 
@@ -837,7 +891,7 @@
 		*p++ = c;
 	      c = *++pc->input;
 	    }
-	  while (ISALPHA (c) || c == '.');
+	  while (ISALPHA (c) || c == '.' || c == '/' || c == '_');
 
 	  *p = '\0';
 	  tp = lookup_word (pc, buff);
