theory.html (61c1328eb016476ee7ff5ad65d8224bb43e572db) | theory.html (dd5f96c48d40188524c9397d8b996b090da09be9) |
---|---|
1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <title>Theory and pragmatics of the tz code and data</title> 5 <meta charset="UTF-8"> 6 <style> 7 pre {margin-left: 2em; white-space: pre-wrap;} 8 </style> --- 284 unchanged lines hidden (view full) --- 293 For example, do not change the existing name <code>Europe/Rome</code> to 294 <code>Europe/Milan</code> merely because Milan's population has grown 295 to be somewhat greater than Rome's. 296 </li> 297 <li> 298 If a name is changed, put its old spelling in the 299 '<code>backward</code>' file. 300 This means old spellings will continue to work. | 1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <title>Theory and pragmatics of the tz code and data</title> 5 <meta charset="UTF-8"> 6 <style> 7 pre {margin-left: 2em; white-space: pre-wrap;} 8 </style> --- 284 unchanged lines hidden (view full) --- 293 For example, do not change the existing name <code>Europe/Rome</code> to 294 <code>Europe/Milan</code> merely because Milan's population has grown 295 to be somewhat greater than Rome's. 296 </li> 297 <li> 298 If a name is changed, put its old spelling in the 299 '<code>backward</code>' file. 300 This means old spellings will continue to work. |
301 Ordinarily a name change should occur only in the rare case when 302 a location's consensus English-language spelling changes; for example, 303 in 2008 <code>Asia/Calcutta</code> was renamed to <code>Asia/Kolkata</code> 304 due to long-time widespread use of the new city name instead of the old. |
|
301 </li> 302</ul> 303 304<p> 305Guidelines have evolved with time, and names following old versions of 306these guidelines might not follow the current version. When guidelines 307have changed, old names continue to be supported. Guideline changes 308have included the following: --- 740 unchanged lines hidden (view full) --- 1049 The <code>tzalloc</code> and <code>tzfree</code> functions 1050 allocate and free objects of type <code>timezone_t</code>, 1051 and <code>localtime_rz</code> and <code>mktime_z</code> are 1052 like <code>localtime_r</code> and <code>mktime</code> with an 1053 extra <code>timezone_t</code> argument. 1054 The functions were inspired by <a href="https://netbsd.org/">NetBSD</a>. 1055 </li> 1056 <li> | 305 </li> 306</ul> 307 308<p> 309Guidelines have evolved with time, and names following old versions of 310these guidelines might not follow the current version. When guidelines 311have changed, old names continue to be supported. Guideline changes 312have included the following: --- 740 unchanged lines hidden (view full) --- 1053 The <code>tzalloc</code> and <code>tzfree</code> functions 1054 allocate and free objects of type <code>timezone_t</code>, 1055 and <code>localtime_rz</code> and <code>mktime_z</code> are 1056 like <code>localtime_r</code> and <code>mktime</code> with an 1057 extra <code>timezone_t</code> argument. 1058 The functions were inspired by <a href="https://netbsd.org/">NetBSD</a>. 1059 </li> 1060 <li> |
1057 A function <code>tzsetwall</code> has been added to arrange for the 1058 system's best approximation to local (wall clock) time to be delivered 1059 by subsequent calls to <code>localtime</code>. 1060 Source code for portable applications that "must" run on local 1061 time should call <code>tzsetwall</code>; 1062 if such code is moved to "old" systems that do not 1063 provide <code>tzsetwall</code>, you will not be able to generate an 1064 executable program. 1065 (These functions also arrange for local time to 1066 be used if <code>tzset</code> is called – directly or 1067 indirectly – and there is no <code>TZ</code> environment 1068 variable; portable applications should not, however, rely on this 1069 behavior since it is not the way <a 1070 href="https://en.wikipedia.org/wiki/UNIX_System_V#SVR2"><abbr>SVR2</abbr></a> 1071 systems behave.) 1072 </li> 1073 <li> | |
1074 Negative <code>time_t</code> values are supported, on systems 1075 where <code>time_t</code> is signed. 1076 </li> 1077 <li> 1078 These functions can account for leap seconds; 1079 see <a href="#leapsec">Leap seconds</a> below. 1080 </li> 1081</ul> --- 50 unchanged lines hidden (view full) --- 1132 package; it is impossible to reliably map <code>timezone</code>'s 1133 arguments (a "minutes west of <abbr>GMT</abbr>" value and a 1134 "daylight saving time in effect" flag) to a time zone 1135 abbreviation, and we refuse to guess. 1136 Programs that in the past used the <code>timezone</code> function 1137 may now examine <code>localtime(&clock)->tm_zone</code> 1138 (if <code>TM_ZONE</code> is defined) or 1139 <code>tzname[localtime(&clock)->tm_isdst]</code> | 1061 Negative <code>time_t</code> values are supported, on systems 1062 where <code>time_t</code> is signed. 1063 </li> 1064 <li> 1065 These functions can account for leap seconds; 1066 see <a href="#leapsec">Leap seconds</a> below. 1067 </li> 1068</ul> --- 50 unchanged lines hidden (view full) --- 1119 package; it is impossible to reliably map <code>timezone</code>'s 1120 arguments (a "minutes west of <abbr>GMT</abbr>" value and a 1121 "daylight saving time in effect" flag) to a time zone 1122 abbreviation, and we refuse to guess. 1123 Programs that in the past used the <code>timezone</code> function 1124 may now examine <code>localtime(&clock)->tm_zone</code> 1125 (if <code>TM_ZONE</code> is defined) or 1126 <code>tzname[localtime(&clock)->tm_isdst]</code> |
1140 (if <code>HAVE_TZNAME</code> is defined) to learn the correct time | 1127 (if <code>HAVE_TZNAME</code> is nonzero) to learn the correct time |
1141 zone abbreviation to use. 1142 </li> 1143 <li> 1144 The <a 1145 href="https://en.wikipedia.org/wiki/History_of_the_Berkeley_Software_Distribution#4.2BSD"><abbr>4.2BSD</abbr></a> 1146 <code>gettimeofday</code> function is not 1147 used in this package. 1148 This formerly let users obtain the current <abbr>UTC</abbr> offset --- 304 unchanged lines hidden --- | 1128 zone abbreviation to use. 1129 </li> 1130 <li> 1131 The <a 1132 href="https://en.wikipedia.org/wiki/History_of_the_Berkeley_Software_Distribution#4.2BSD"><abbr>4.2BSD</abbr></a> 1133 <code>gettimeofday</code> function is not 1134 used in this package. 1135 This formerly let users obtain the current <abbr>UTC</abbr> offset --- 304 unchanged lines hidden --- |