Branch: Tag:

2002-07-15

2002-07-15 13:26:45 by Martin Nilsson <mani@lysator.liu.se>

Fixed two problems with dwim parsing of ctime

Rev: lib/modules/Calendar.pmod/YMD.pmod:1.46

2514:    if (zonename[0]=='"') sscanf(zonename,"\"%s\"",zonename);    sscanf(zonename,"%*[ \t]%s",zonename);    +  // Ugly fix for synonyms. This suppport should of course be +  // added in a lower layer when the next refactoring occurs. +  zonename = ([ "MEST":"CET", "MESZ":"CET" ])[zonename] || zonename; +     if (origin->rules->abbr2zone[zonename])    zonename=origin->rules->abbr2zone[zonename];   
2884:      // #define COLON "$*[ :]"   #define COLON ":" + #define SPACED(X) replace(X," ","%*[ ]")       sscanf(what,"%*[ \t]%s",what);    -  if (t=parse("%e %M %D %h:%m:%s %Y",what,cx)) return t; // ctime -  if (t=parse("%e %M %D %h:%m:%s %z %Y",what,cx)) return t; +  if (t=parse(SPACED("%e %M %D %h:%m:%s %Y"),what,cx)) return t; // ctime +  if (t=parse(SPACED("%e %M %D %h:%m:%s %z %Y"),what,cx)) return t;       foreach ( dwim_day_strings +    ({""}),