+ <p>Use the <b>time</b> <control_st tag="function">function</control_st> to display the current time to the user, or to store the time for later use.</p><p/><p><b>Value:</b></p><p>If the <b>useSystemDate</b> <glossary tag="property">property</glossary> is set to true or if you specify the <keyword tag="system">system</keyword> time, the times returned by the <b>time</b> <control_st tag="function">function</control_st> are <glossary tag="format">formatted</glossary> according to the user's system preferences.</p><p/><p>If the <b>useSystemDate</b> is false or if you specify the <keyword tag="english">english</keyword> time, the times are in the <function tag="format">format</function> described below:</p><p/><p>The<code> time </code>form returns the hour and minute separated by a colon, a space, and "<code>AM</code>" or "<code>PM</code>".</p><p/><p>The<code> short time </code>form returns the same value as the<code> time </code>form.</p><p/><p>The<code> abbreviated time </code>form returns the same value as the<code> time </code>form.</p><p/><p>The<code> long time </code>form returns the hour, minute, and second separated by colons, a space, and "<code>AM</code>" or "<code>PM</code>".</p><p/><p><b>Comments:</b></p><p>If the <b>twelveHourTime</b> <glossary tag="property">property</glossary> is set to false, the value <glossary tag="return">returned</glossary> by the <b>time</b> <control_st tag="function">function</control_st> does not include "<code>AM</code>" or "<code>PM</code>".</p><p/><p>The format of the<code> system time </code>forms is set by the Date & Time control panel (on Mac OS systems), the Date control panel (on <glossary tag="Windows">Windows systems</glossary>), or the LANG environment variable (on <glossary tag="Unix">Unix systems</glossary>). Linux systems don't have a short system time, so the engine modifies the system time format string to remove the seconds. This works in most locales, but not all and our advice is to stick to using the long system time on Linux systems.</p><p/><p><b>Changes:</b></p><p>The ability to use the time format preferred by the user was introduced in version 1.1. In previous versions, the <b>time</b> <control_st tag="function">function</control_st>, along with the <function tag="date">date</function> <control_st tag="function">function</control_st>, consistently used the standard U.S. <function tag="format">format</function>, even if the operating system's settings specified another language or time <function tag="format">format</function>.</p>
0 commit comments