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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Time.pmod:734:   //! xtime "2000-06-02 20:53:14.000000"   //! todz "20:53:14 CET"   //! todz_iso "20:53:14 UTC+1"   //! tod "20:53:14"   //! tod_short "205314"   //! xtod "20:53:14.000000"   //! mod "20:53"   //! nice "2 Jun 20:53", "2 Jun 2000 20:53:14" [2][5]   //! nicez "2 Jun 20:53 CET" [2][5]   //! smtp "Fri, 2 Jun 2000 20:53:14 +0100" [6] + //! commonlog "02/Jun/2000:20:53:14 +0100" [2]   //! </pre>   //! <tt>[1]</tt> note conflict (think 1 February 2003)   //! <br><tt>[2]</tt> language dependent   //! <br><tt>[3]</tt> as from the libc function ctime()   //! <br><tt>[4]</tt> as specified by the HTTP standard;   //! this is always in GMT, ie, UTC. The timezone calculations   //! needed will be executed implicitly. It is not language   //! dependent.   //! <br><tt>[5]</tt> adaptive to type and with special cases   //! for yesterday, tomorrow and other years
pike.git/lib/modules/Calendar.pmod/Time.pmod:817:    string format_http()    {    if (utc_offset())    return set_timezone(Timezone_UTC)->format_http();    if (!base) make_base();       return replace(base->format_http(),    "00:00:00",format_tod());    }    +  string format_commonlog() +  { +  if (!base) make_base(); +  return replace(base->format_commonlog(), +  "00:00:00 ",format_tod()+" "); +  } +     string format_tod()    {    if (ls==CALUNKNOWN) make_local();    return sprintf("%02d:%02d:%02d", ls/3600, (ls/60)%60, ls%60);    }       string format_tod_short()    {    if (ls==CALUNKNOWN) make_local();    return sprintf("%02d%02d%02d", ls/3600, (ls/60)%60, ls%60);
pike.git/lib/modules/Calendar.pmod/Time.pmod:941:    return    (u<0)    ?sprintf("UTC+%d:%02d",-u/3600,(-u/60)%60)    :sprintf("UTC-%d:%02d",u/3600,(u/60)%60);    return    (u<0)    ?sprintf("UTC+%d:%02d:%02d",-u/3600,(-u/60)%60,(-u)%60)    :sprintf("UTC-%d:%02d:%02d",u/3600,(u/60)%60,u%60);    }    +  string tzname_utc_offset() +  { +  int u=utc_offset(); +  return sprintf("%+03d%02d", -u/3600, abs(u)/60%60); +  }    -  +  string tzname_location() +  { +  string location = rules->timezone->zoneid; +  if (location || tzn) return location || tzn; +  return [utco,tzn]=rules->timezone->tz_ux(ux), tzn; +  }      // -----------------------------------------------------------------       TimeRange place(TimeRange what,void|int force)    {    if (!base) make_base();    if (what->is_ymd)    return base->place(what,force);       error("place: Incompatible type %O\n",what);