Branch: Tag:

2000-08-12

2000-08-12 08:45:26 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

bugfix in dwim_time (needed 02:03::47 for second precision)
dwim_zone and Timezone[] now understands "-0700" timezones for handling mail time like "Sat, 12 Aug 2000 00:49:42 -0700"

Rev: lib/modules/Calendar.pmod/Timezone.pmod:1.6
Rev: lib/modules/Calendar.pmod/YMD.pmod:1.8

209:   // werror("%O\n",t2-t1);    if (p) return p;    -  if (sscanf(tz,"%s+%f",z,d)==2) +  if (sscanf(tz,"%s+%f",z,d)==2 && z!="")    return _make_new_timezone(z,d); -  if (sscanf(tz,"%s-%f",z,d)==2) +  if (sscanf(tz,"%s-%f",z,d)==2 && z!="")    return _make_new_timezone(z,-d);    if ((z=_military_tz[tz])) return `[](z); -  +  +  if (sscanf(tz,"%[-+]%[0-9]",string a,string b)==2 && +  (<"-","+">)[a]) +  switch (strlen(b)) +  { +  case 2: return _magic_timezone("UTC"+a+b[..1]); +  case 4: return _magic_timezone("UTC"+a+b[..1]+":"+b[2..]); +  case 6: return _magic_timezone("UTC"+a+b[..1]+":"+b[2..3]+":"+b[4..]); +  } +     return ::`[](replace(tz,"-/+"/1,"__p"/1));   }