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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Timezone.pmod:52:   //! to find out what current offset and timezone string to use.   //!   //! <ref>locale</ref> uses this if there is no other   //! way of finding a better timezone to use.   //!   //! This timezone is limited by <ref>localtime</ref> and   //! libc to the range of <tt>time_t</tt>,   //! which is a MAXINT on most systems - 13 Dec 1901 20:45:52   //! to 19 Jan 2038 3:14:07, UTC.    - //! module Calendar - //! submodule TZnames - //! This module is a mapping of the names of - //! all the geographical (political) - //! based timezones. It looks mainly like - //! <pre> - //! (["Europe":({"Stockholm","Paris",...}), - //! "America":({"Chicago","Panama",...}), - //! ... - //! ]) - //! </pre> - //! - //! It is mainly there for easy and reliable ways - //! of making user interfaces to select timezone. - //! - //! The Posix and standard timezones (like CET, PST8PDT, etc) - //! are not listed. -  -  +    #pike __REAL_VERSION__      import ".";      // ----------------------------------------------------------------   // static      Ruleset.Timezone UTC=Ruleset.Timezone(0,"UTC");      // ----------------------------------------------------------------
pike.git/lib/modules/Calendar.pmod/Timezone.pmod:290:    if (plusminus==0)    return z;    string s;    if (plusminus%60)    s=sprintf("%+d:%02d:%02d",plusminus/3600,plusminus/60%60,plusminus%60);    else if (plusminus/60%60)    s=sprintf("%+d:%02d",plusminus/3600,plusminus/60%60);    else    s=sprintf("%+d",plusminus/3600);    -  return Timezone_Encapsule(z,s,plusminus); +  return Timezone_Encapsule(z,s,-plusminus);   }      static private constant _military_tz=   ([ "Y":"UTC-12", "X":"UTC-11", "W":"UTC-10", "V":"UTC-9", "U":"UTC-8",    "T":"UTC-7", "S":"UTC-6", "R":"UTC-5", "Q":"UTC-4", "P":"UTC-3",    "O":"UTC-2", "N":"UTC-1", "Z":"UTC", "A":"UTC+1", "B":"UTC+2",    "C":"UTC+3", "D":"UTC+4", "E":"UTC+5", "F":"UTC+6", "G":"UTC+7",    "H":"UTC+8", "I":"UTC+9", "K":"UTC+10", "L":"UTC+11", "M":"UTC+12",    "J":"locale" ]);