You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: os.html
+73-44Lines changed: 73 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -695,52 +695,90 @@ <h3>CLOCK_GETRES<a class="headerlink" href="#clock-getres" title="Permalink to t
695
695
</dd></dl>
696
696
697
697
</div>
698
-
<divclass="section" id="clock-gettime">
699
-
<h3>CLOCK_GETTIME<aclass="headerlink" href="#clock-gettime" title="Permalink to this headline">¶</a></h3>
698
+
<divclass="section" id="tzset">
699
+
<h3>TZSET<aclass="headerlink" href="#tzset" title="Permalink to this headline">¶</a></h3>
700
700
<dlclass="function">
701
-
<dtid="c.clock_gettime">
702
-
int <codeclass="sig-name descname">clock_gettime</code><spanclass="sig-paren">(</span>clockid_t<em> clock_id</em>, struct timespec<em> *tp</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.clock_gettime" title="Permalink to this definition">¶</a></dt>
int <codeclass="sig-name descname">f_tzset</code><spanclass="sig-paren">(</span>struct _tzset<em> *tz</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.f_tzset" title="Permalink to this definition">¶</a></dt>
<spanclass="kt">int8_t</span><spanclass="n">daylight</span><spanclass="p">;</span><spanclass="cm">/* non 0 if daylight savings time active */</span>
711
+
<spanclass="kt">int32_t</span><spanclass="n">timezone</span><spanclass="p">;</span><spanclass="cm">/* Number of seconds behind UTC */</span>
712
+
<spanclass="kt">char</span><spanclass="n">tzname</span><spanclass="p">[</span><spanclass="mi">5</span><spanclass="p">];</span><spanclass="cm">/* Name of timezone, e.g. CET */</span>
713
+
<spanclass="kt">char</span><spanclass="n">dstname</span><spanclass="p">[</span><spanclass="mi">5</span><spanclass="p">];</span><spanclass="cm">/* Name when daylight true, e.g. CEST */</span>
714
+
<spanclass="p">};</span>
715
+
</pre></div>
705
716
</div>
706
-
<p>Obtains the current time.</p>
717
+
<p>The virtual f_tzset() is the how tzset() is implemented. Use <cite>help set tz</cite> on the
718
+
monitor to learn about configuring your time zone.</p>
int <codeclass="sig-name descname">f_tzquery</code><spanclass="sig-paren">(</span>uint32_t<em> time</em>, struct _tzquery<em> *dst</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.f_tzquery" title="Permalink to this definition">¶</a></dt>
<spanclass="kt">int8_t</span><spanclass="n">daylight</span><spanclass="p">;</span><spanclass="cm">/* non 0 if daylight savings time active */</span>
749
+
<spanclass="p">};</span>
750
+
</pre></div>
751
+
</div>
752
+
<p>The virtual f_tzquery() is part of how localtime() is implemented.</p>
753
+
<dlclass="field-list simple">
754
+
<dtclass="field-odd">Op code</dt>
755
+
<ddclass="field-odd"><p>RIA_OP_TZQUERY 0x0E</p>
756
+
</dd>
757
+
<dtclass="field-even">C proto</dt>
758
+
<ddclass="field-even"><p>time.h</p>
759
+
</dd>
760
+
<dtclass="field-odd">Returns</dt>
761
+
<ddclass="field-odd"><p>Seconds to add to UTC for localtime.</p>
724
762
</dd>
725
763
<dtclass="field-even">Errno</dt>
726
-
<ddclass="field-even"><p>EINVAL, EUNKNOWN</p>
764
+
<ddclass="field-even"><p>will not fail</p>
727
765
</dd>
728
766
</dl>
729
767
</dd></dl>
730
768
731
769
</div>
732
-
<divclass="section" id="clock-settime">
733
-
<h3>CLOCK_SETTIME<aclass="headerlink" href="#clock-settime" title="Permalink to this headline">¶</a></h3>
770
+
<divclass="section" id="clock-gettime">
771
+
<h3>CLOCK_GETTIME<aclass="headerlink" href="#clock-gettime" title="Permalink to this headline">¶</a></h3>
734
772
<dlclass="function">
735
-
<dtid="c.clock_settime">
736
-
int <codeclass="sig-name descname">clock_settime</code><spanclass="sig-paren">(</span>clockid_t<em> clock_id</em>, const struct timespec<em> *tp</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.clock_settime" title="Permalink to this definition">¶</a></dt>
773
+
<dtid="c.clock_gettime">
774
+
int <codeclass="sig-name descname">clock_gettime</code><spanclass="sig-paren">(</span>clockid_t<em> clock_id</em>, struct timespec<em> *tp</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.clock_gettime" title="Permalink to this definition">¶</a></dt>
@@ -763,34 +801,24 @@ <h3>CLOCK_SETTIME<a class="headerlink" href="#clock-settime" title="Permalink to
763
801
</dd></dl>
764
802
765
803
</div>
766
-
<divclass="section" id="clock-gettimezone">
767
-
<h3>CLOCK_GETTIMEZONE<aclass="headerlink" href="#clock-gettimezone" title="Permalink to this headline">¶</a></h3>
804
+
<divclass="section" id="clock-settime">
805
+
<h3>CLOCK_SETTIME<aclass="headerlink" href="#clock-settime" title="Permalink to this headline">¶</a></h3>
768
806
<dlclass="function">
769
-
<dtid="c.clock_gettimezone">
770
-
int <codeclass="sig-name descname">clock_gettimezone</code><spanclass="sig-paren">(</span>uint32_t<em> time</em>, clockid_t<em> clock_id</em>, struct _timezone<em> *tz</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.clock_gettimezone" title="Permalink to this definition">¶</a></dt>
<spanclass="kt">int8_t</span><spanclass="n">daylight</span><spanclass="p">;</span><spanclass="cm">/* >0 if daylight savings time active */</span>
774
-
<spanclass="kt">int32_t</span><spanclass="n">timezone</span><spanclass="p">;</span><spanclass="cm">/* Number of seconds behind UTC */</span>
775
-
<spanclass="kt">char</span><spanclass="n">tzname</span><spanclass="p">[</span><spanclass="mi">5</span><spanclass="p">];</span><spanclass="cm">/* Name of timezone, e.g. CET */</span>
776
-
<spanclass="kt">char</span><spanclass="n">dstname</span><spanclass="p">[</span><spanclass="mi">5</span><spanclass="p">];</span><spanclass="cm">/* Name when daylight true, e.g. CEST */</span>
777
-
<spanclass="p">};</span>
778
-
</pre></div>
807
+
<dtid="c.clock_settime">
808
+
int <codeclass="sig-name descname">clock_settime</code><spanclass="sig-paren">(</span>clockid_t<em> clock_id</em>, const struct timespec<em> *tp</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#c.clock_settime" title="Permalink to this definition">¶</a></dt>
809
+
<dd><divclass="line-block">
810
+
<divclass="line"><br/></div>
779
811
</div>
780
-
<p>Returns a cc65 _timezone structure for the requested time. Use
781
-
<cite>help set tz</cite> on the monitor to learn about configuring your time zone.</p>
782
-
<p><strong>* Experimental *</strong> time zones in cc65 are incomplete probably because no
0 commit comments