pike.git / lib / modules / Calendar.pmod / YMD.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pmod:2433:       if (zonename[0]=='"') sscanf(zonename,"\"%s\"",zonename);    sscanf(zonename,"%*[ \t]%s",zonename);       if (origin->rules->abbr2zone[zonename])    zonename=origin->rules->abbr2zone[zonename];       Ruleset.Timezone zone=Timezone[zonename];    if (!zone)    { +  if (sscanf(zonename,"%[^-+]%s",string a,string b)==2 && a!="" && b!="") +  { +  TimeRange tr=dwim_zone(origin,a,whut,@args); +  if (!tr) return 0; +  +  return +  dwim_tod(origin->set_timezone( +  Timezone.make_new_timezone( +  tr->timezone(), +  Timezone.decode_timeskew(b))), +  whut,@args); +  } +     array pz=TZnames.abbr2zones[zonename];    if (!pz) return 0;    foreach (pz,string zn)    {    TimeRange try=dwim_zone(origin,zn,whut,@args); -  if (try->tzname()==zonename) return try; +  if (try && try->tzname()==zonename) return try;    }    return 0;    }    else    return dwim_tod(origin->set_timezone(zone),whut,@args);   }      static mapping(string:array) parse_format_cache=([]);      TimeRange parse(string fmt,string arg,void|TimeRange context)