सिस्टम टाइम: Difference between revisions

From Vigyanwiki
Line 28: Line 28:


===ऑपरेटिंग सिस्टम===
===ऑपरेटिंग सिस्टम===
{| class="wikitable"
!ऑपरेटिंग सिस्टम
!कमांड अथवा फंक्शन
!रेसोलुशन
!युग या श्रेणी
|-
| rowspan="1" |एंड्रॉयड
|{{mono|java.lang<wbr/>.System.currentTimeMillis()}}
| rowspan="1" |1 ms
| rowspan="1" |1 जनवरी 1970
|-
| rowspan="3" |बायोस (आईबीएम पीसी)
|{{mono|1=INT 1Ah, AH=00h}}<ref name=":0" />
| rowspan="1" |54.9254 ms<br /> 18.2065&nbsp;Hz<!-- <br /> 2<sup>16</sup> ticks/hr -->
|वर्तमान दिन की मध्यरात्रि
|-
|{{mono|1=INT 1Ah, AH=02h}}<ref name=":1" /><!--<br /> or reading CMOS regs.-->
|1 s
|वर्तमान दिन की मध्यरात्रि
|-
|{{mono|1=INT 1Ah, AH=04h}}<ref name=":2" /><!--<br /> or reading CMOS regs.-->
|1 day
|1 जनवरी 1980 से 31 दिसंबर 1999 या 31 दिसंबर 2079 (सिस्टम निर्भर)
|-
| rowspan="2" |सीपी/एम प्लस
|System Control Block:<ref name=":3" /><br/> {{mono|scb$base+58h}}, Days since 31 December 1977<br/> {{mono|scb$base+5Ah}}, Hour (BCD)<br/> {{mono|scb$base+5Bh}}, Minute (BCD)<br/> {{mono|scb$base+5Ch}}, Second (BCD)<br/>
| rowspan="2" |1 s
|31 दिसंबर 1977 से 5 जून 2157 तक
|-
|BDOS function {{mono|69h}}> ({{mono|T_GET}}):<ref name=":4" /><br/> {{mono|word}}, Days since 1 January 1978<br/> {{mono|byte}}, Hour (BCD)<br/> {{mono|byte}}, Minute (BCD)<br /> {{mono|byte}}, Second (BCD)
|
|-
| rowspan="2" |डॉस (माइक्रोसॉफ्ट)
|<code>{{samp|C:\>}}[[DATE (command)|DATE]]<br/>{{samp|C:\>}}[[TIME (command)|TIME]]</code>
| rowspan="2" |10 ms<!-- DL returns 1/100 of a second, so '''resolution''' is 10 ms; though accuracy is 55 ms.  Also the [[FAT filesystem]] stores timestamps with 2 s resolution, except for create date, which is stored in 10 ms -->
|1 जनवरी 1980 से 31 दिसंबर 2099 तक
|-
|<code>INT 21h, AH=2Ch SYSTEM TIME</code><ref name=":5" /><br/><code>INT 21h, AH=2Ah SYSTEM DATE</code><ref name=":6" />
|
|-
|आईओएस (एप्पल)
|<code>CFAbsoluteTimeGetCurrent()</code><ref name=":7" />
|< 1 ms
|1 जनवरी 2001 ± 10,000 वर्ष
|-
|मैक ओएस
|<code>CFAbsoluteTimeGetCurrent()</code><ref name=":8" />
|< 1 ms<ref name="Apple_CFRunLoopTimerCreate" /><ref name="Apple_CF_NSTimeInterval" group="note" />
|1 जनवरी 2001 ±10,000 वर्ष
|-
| rowspan="3" |ओपन वीएमएस
|<code>SYS$GETTIM()</code>
|100 ns<ref name="idsm-5.2" />
|17 नवंबर 1858 से 31 जुलाई 31,086
|-
|<code><span class="plainlinks">{{man|sh|gettimeofday|SUS||inline}}()</span></code>
|1 [[Microsecond|μs]]<ref name="vsi-c-rtl" />
| rowspan="2" |1 जनवरी 1970 से 7 फरवरी 2106
|-
|<code><span class="plainlinks">{{man|sh|clock_gettime|SUS||inline}}()</span></code>
|1 [[Nanosecond|ns]]<ref name="vsi-c-rtl" />
|-
| rowspan="2" |जेड/ओएस
|<code>STCK</code><ref name="z-architecture" />{{rp|7–187}}
| rowspan="2" |2<sup>&minus;12</sup> μs<br /> 244.14 ps<ref name="z-architecture"/>{{rp|4-45, 4-46}}
|1 जनवरी 1900 से 17 सितंबर 2042 यूटी
|-
|<code>STCKE</code>
|1 जनवरी 1900 से 36,765 ई. तक
|-
| rowspan="3" |यूनिक्स , पॉज़िक्स
( सी तिथि और समय कार्यों को भी देखें )
|<code>{{samp|$}}[[date (Unix)|date]]</code><br /><code>[[time()]]</code>
|1 s
|(*)
1 जनवरी 1970 ( लिनक्स 5.9 से पहले 19 जनवरी 2038 तक) से 2 जुलाई 2486 (लिनक्स 5.10 के बाद से)
1 जनवरी 1970 से 4 दिसंबर एडी 292,277,026,596
|-
|<code><span class="plainlinks">{{man|sh|gettimeofday|SUS||inline}}()</span></code>
|1 [[Microsecond|μs]]
|
|-
|<code><span class="plainlinks">{{man|sh|clock_gettime|SUS||inline}}()</span></code>
|1 ns
|
|-
|ओएस/2
|<code>DosGetDateTime()</code>
|10 ms
|1 जनवरी 1980 से 31 दिसंबर 2079
|-
| rowspan="3" |विंडोज
|<code>GetSystemTime()</code>
|1 ms
|1 जनवरी 1601 से 14 सितंबर 30828, 02:48:05.4775807
|-
|<code>GetSystemTimeAsFileTime()</code>
| rowspan="2" |100 ns
|
|-
|<code>GetSystemTimePreciseAsFileTime()</code>
|
|}
=== प्रोग्रामिंग भाषाएं और अनुप्रयोग ===
{| class="wikitable" style="width:98%; background:#F0F0E7"
{| class="wikitable" style="width:98%; background:#F0F0E7"
|-
|-
Line 41: Line 152:
|-
|-
| rowspan="3" |[[BIOS]] ([[IBM Personal Computer|IBM PC]])
| rowspan="3" |[[BIOS]] ([[IBM Personal Computer|IBM PC]])
| {{mono|1=INT 1Ah, AH=00h}}<ref>{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x1A, AH=0x00|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/1A/00.html}}</ref>
| {{mono|1=INT 1Ah, AH=00h}}<ref name=":0">{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x1A, AH=0x00|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/1A/00.html}}</ref>
| 54.9254 ms<br /> 18.2065&nbsp;Hz <!-- <br /> 2<sup>16</sup> ticks/hr -->
| 54.9254 ms<br /> 18.2065&nbsp;Hz<!-- <br /> 2<sup>16</sup> ticks/hr -->
| Midnight of the current day
| Midnight of the current day
|-
|-
| {{mono|1=INT 1Ah, AH=02h}}<ref>{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x1A, AH=0x02|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/1A/02.html}}</ref><!--<br /> or reading CMOS regs.-->
| {{mono|1=INT 1Ah, AH=02h}}<ref name=":1">{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x1A, AH=0x02|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/1A/02.html}}</ref><!--<br /> or reading CMOS regs.-->
| 1 s
| 1 s
| Midnight of the current day
| Midnight of the current day
|-
|-
| {{mono|1=INT 1Ah, AH=04h}}<ref>{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x1A, AH=0x04|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/1A/04.html}}</ref><!--<br /> or reading CMOS regs.-->
| {{mono|1=INT 1Ah, AH=04h}}<ref name=":2">{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x1A, AH=0x04|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/1A/04.html}}</ref><!--<br /> or reading CMOS regs.-->
| 1 day
| 1 day
| 1 January 1980 to 31 December 1999 or 31 December 2079 (system dependent)
| 1 January 1980 to 31 December 1999 or 31 December 2079 (system dependent)
|-
|-
| rowspan="2" | [[CP/M Plus]]
| rowspan="2" | [[CP/M Plus]]
| System Control Block:<ref>{{cite web |url=http://www.cpm.z80.de/manuals/cpm3-sys.pdf |title=CP/M Plus (CP/M Version 3.0) Operating System Guide}}</ref><br/> {{mono|scb$base+58h}}, Days since 31 December 1977<br/> {{mono|scb$base+5Ah}}, Hour (BCD)<br/> {{mono|scb$base+5Bh}}, Minute (BCD)<br/> {{mono|scb$base+5Ch}}, Second (BCD)<br/>
| System Control Block:<ref name=":3">{{cite web |url=http://www.cpm.z80.de/manuals/cpm3-sys.pdf |title=CP/M Plus (CP/M Version 3.0) Operating System Guide}}</ref><br /> {{mono|scb$base+58h}}, Days since 31 December 1977<br /> {{mono|scb$base+5Ah}}, Hour (BCD)<br /> {{mono|scb$base+5Bh}}, Minute (BCD)<br /> {{mono|scb$base+5Ch}}, Second (BCD)<br />
| rowspan="2" | 1 s
| rowspan="2" | 1 s
| rowspan="2" | 31 December 1977 to 5 June 2157
| rowspan="2" | 31 December 1977 to 5 June 2157
|-
|-
| BDOS function {{mono|69h}}> ({{mono|T_GET}}):<ref>{{cite web |url=http://www.seasip.info/Cpm/bdos.html#105 |title=BDOS system calls}}</ref><br/> {{mono|word}}, Days since 1 January 1978<br/> {{mono|byte}}, Hour (BCD)<br/> {{mono|byte}}, Minute (BCD)<br /> {{mono|byte}}, Second (BCD)
| BDOS function {{mono|69h}}> ({{mono|T_GET}}):<ref name=":4">{{cite web |url=http://www.seasip.info/Cpm/bdos.html#105 |title=BDOS system calls}}</ref><br /> {{mono|word}}, Days since 1 January 1978<br /> {{mono|byte}}, Hour (BCD)<br /> {{mono|byte}}, Minute (BCD)<br /> {{mono|byte}}, Second (BCD)
|-
|-
| rowspan="2" | [[DOS]] ([[Microsoft]])
| rowspan="2" | [[DOS]] ([[Microsoft]])
| <code>{{samp|C:\>}}[[DATE (command)|DATE]]<br/>{{samp|C:\>}}[[TIME (command)|TIME]]</code>
| <code>{{samp|C:\>}}[[DATE (command)|DATE]]<br />{{samp|C:\>}}[[TIME (command)|TIME]]</code>
| rowspan="2" | 10 ms<!-- DL returns 1/100 of a second, so '''resolution''' is 10 ms; though accuracy is 55 ms.  Also the [[FAT filesystem]] stores timestamps with 2 s resolution, except for create date, which is stored in 10 ms -->
| rowspan="2" | 10 ms<!-- DL returns 1/100 of a second, so '''resolution''' is 10 ms; though accuracy is 55 ms.  Also the [[FAT filesystem]] stores timestamps with 2 s resolution, except for create date, which is stored in 10 ms -->
| rowspan="2" | 1 January 1980 to 31 December 2099
| rowspan="2" | 1 January 1980 to 31 December 2099
|-
|-
| <code>INT 21h, AH=2Ch SYSTEM TIME</code><ref>{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x21, AH=0x2c|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/21/2C.html}}</ref><br/><code>INT 21h, AH=2Ah SYSTEM DATE</code><ref>{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x21, AH=0x2a|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/21/2A.html}}</ref>
| <code>INT 21h, AH=2Ch SYSTEM TIME</code><ref name=":5">{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x21, AH=0x2c|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/21/2C.html}}</ref><br /><code>INT 21h, AH=2Ah SYSTEM DATE</code><ref name=":6">{{cite web|author=Ralf D. Brown|author-link=Ralf D. Brown|title=Int 0x21, AH=0x2a|work=[[Ralf Brown's Interrupt List]]|date=2000|url=http://www.delorie.com/djgpp/doc/rbinter/ix/21/2A.html}}</ref>
|-
|-
| [[iOS]] ([[Apple Inc.|Apple]])
| [[iOS]] ([[Apple Inc.|Apple]])
| <code>CFAbsoluteTimeGetCurrent()</code><ref>{{cite web|url=https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFTimeUtils/Reference/reference.html#//apple_ref/doc/c_ref/CFAbsoluteTimeGetCurrent|title=Time Utilities Reference|work=iOS Developer Library|date=2007}}</ref>
| <code>CFAbsoluteTimeGetCurrent()</code><ref name=":7">{{cite web|url=https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFTimeUtils/Reference/reference.html#//apple_ref/doc/c_ref/CFAbsoluteTimeGetCurrent|title=Time Utilities Reference|work=iOS Developer Library|date=2007}}</ref>
| < 1 ms
| < 1 ms
| 1 January 2001 ±10,000 years
| 1 January 2001 ±10,000 years
|-
|-
| [[macOS]]
| [[macOS]]
| <code>CFAbsoluteTimeGetCurrent()</code><ref>{{cite web|url=https://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFTimeUtils/Reference/reference.html|title=Time Utilities Reference|work=Mac OS X Developer Library|date=2007}}</ref>
| <code>CFAbsoluteTimeGetCurrent()</code><ref name=":8">{{cite web|url=https://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFTimeUtils/Reference/reference.html|title=Time Utilities Reference|work=Mac OS X Developer Library|date=2007}}</ref>
| < 1 ms<ref name="Apple_CFRunLoopTimerCreate">{{cite web |title=Time Utilities - Foundation |url=https://developer.apple.com/documentation/corefoundation/time_utilities |access-date=6 July 2022 |work=Apple Developer Documentation}}</ref><ref group="note" name="Apple_CF_NSTimeInterval">The Apple Developer Documentation is not clear on the precision & range of CFAbsoluteTime/CFTimeInterval, except in the CFRunLoopTimerCreate documentation which refers to 'sub-millisecond at most' precision. However, the similar type [https://developer.apple.com/documentation/foundation/nstimeinterval NSTimeInterval] appears to be interchangeable, and has the precision and range listed.</ref>  
| < 1 ms<ref name="Apple_CFRunLoopTimerCreate">{{cite web |title=Time Utilities - Foundation |url=https://developer.apple.com/documentation/corefoundation/time_utilities |access-date=6 July 2022 |work=Apple Developer Documentation}}</ref><ref group="note" name="Apple_CF_NSTimeInterval">The Apple Developer Documentation is not clear on the precision & range of CFAbsoluteTime/CFTimeInterval, except in the CFRunLoopTimerCreate documentation which refers to 'sub-millisecond at most' precision. However, the similar type [https://developer.apple.com/documentation/foundation/nstimeinterval NSTimeInterval] appears to be interchangeable, and has the precision and range listed.</ref>  
| 1 January 2001 ±10,000 years<ref name="Apple_CFRunLoopTimerCreate"/><ref group="note" name="Apple_CF_NSTimeInterval"/>
| 1 January 2001 ±10,000 years<ref name="Apple_CFRunLoopTimerCreate" /><ref group="note" name="Apple_CF_NSTimeInterval" />
|-
|-
| rowspan="3" |[[OpenVMS]]
| rowspan="3" |[[OpenVMS]]
| <code>SYS$GETTIM()</code>
| <code>SYS$GETTIM()</code>
| 100 ns<ref name="idsm-5.2">{{cite book|title=VAX/VMS Internals and Data Structures, Version 5.2|url=https://books.google.com/books?id=D7xQAAAAMAAJ|isbn=978-1555580599|author1=Ruth E. Goldenberg|author2=Lawrence J. Kenah|author3=Denise E. Dumas|publisher=Digital Press|date=1991}}</ref>
| 100 ns<ref name="idsm-5.2">{{cite book|title=VAX/VMS Internals and Data Structures, Version 5.2|url=https://books.google.com/books?id=D7xQAAAAMAAJ|isbn=978-1555580599|author1=Ruth E. Goldenberg|author2=Lawrence J. Kenah|author3=Denise E. Dumas|publisher=Digital Press|date=1991}}</ref>
| [[Julian day#Alternatives|17 November 1858]] to 31 July 31,086<ref name = "Crazy time, Stanford, 1997">{{Cite web | url = https://www.slac.stanford.edu/~rkj/crazytime.txt | title = Why is Wednesday, November 17, 1858 the base time for OpenVMS (VAX VMS)? | access-date = 2020-01-08 | date = 1997-07-24 | website = [[Stanford University]] | archive-url = https://web.archive.org/web/19970724202734/https://www.slac.stanford.edu/~rkj/crazytime.txt | archive-date = 1997-07-24  | df = dmy-all | url-status = live}}</ref>
| [[Julian day#Alternatives|17 November 1858]] to 31 July 31,086<ref name="Crazy time, Stanford, 1997">{{Cite web | url = https://www.slac.stanford.edu/~rkj/crazytime.txt | title = Why is Wednesday, November 17, 1858 the base time for OpenVMS (VAX VMS)? | access-date = 2020-01-08 | date = 1997-07-24 | website = [[Stanford University]] | archive-url = https://web.archive.org/web/19970724202734/https://www.slac.stanford.edu/~rkj/crazytime.txt | archive-date = 1997-07-24  | df = dmy-all | url-status = live}}</ref>
|-
|-
| <code><span class="plainlinks">{{man|sh|gettimeofday|SUS||inline}}()</span></code>
| <code><span class="plainlinks">{{man|sh|gettimeofday|SUS||inline}}()</span></code>
Line 91: Line 202:
| rowspan="2" | [[z/OS]]
| rowspan="2" | [[z/OS]]
| <code>STCK</code><ref name="z-architecture">{{cite book|url=http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/A2278325.pdf?DT=20070807125005&XKS=DZ9ZBK07|title=z/Architecture Principles of Operation|location=Poughkeepsie, New York|publisher=International Business Machines|date=2007}}</ref>{{rp|7–187}}
| <code>STCK</code><ref name="z-architecture">{{cite book|url=http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/A2278325.pdf?DT=20070807125005&XKS=DZ9ZBK07|title=z/Architecture Principles of Operation|location=Poughkeepsie, New York|publisher=International Business Machines|date=2007}}</ref>{{rp|7–187}}
| rowspan="2"|2<sup>&minus;12</sup> μs<br /> 244.14 ps<ref name="z-architecture"/>{{rp|4-45, 4-46}}
| rowspan="2" |2<sup>&minus;12</sup> μs<br /> 244.14 ps<ref name="z-architecture" />{{rp|4-45, 4-46}}
| 1 January 1900 to 17 September 2042 UT<ref>IBM intends to extend the date range on future systems beyond 2042. [http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/A2278325.pdf?DT=20070807125005&XKS=DZ9ZBK07 ''z/Architecture Principles of Operation''], (Poughkeepsie, New York:International Business Machines, 2007) 1-15, 4-45 to 4-47.</ref>
| 1 January 1900 to 17 September 2042 UT<ref>IBM intends to extend the date range on future systems beyond 2042. [http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/A2278325.pdf?DT=20070807125005&XKS=DZ9ZBK07 ''z/Architecture Principles of Operation''], (Poughkeepsie, New York:International Business Machines, 2007) 1-15, 4-45 to 4-47.</ref>
|-
|-
Line 97: Line 208:
| 1 January 1900 to AD 36,765<ref>{{cite web|url=https://www.ibm.com/docs/en/zos/2.4.0?topic=addressing-expanded-64-bit-time-values|title=Expanded 64-bit time values|publisher=IBM|access-date=2021-04-18}}</ref>
| 1 January 1900 to AD 36,765<ref>{{cite web|url=https://www.ibm.com/docs/en/zos/2.4.0?topic=addressing-expanded-64-bit-time-values|title=Expanded 64-bit time values|publisher=IBM|access-date=2021-04-18}}</ref>
|-
|-
| rowspan="3" | [[Unix]], [[POSIX]]<br/> (see also [[C date and time functions]])
| rowspan="3" | [[Unix]], [[POSIX]]<br /> (see also [[C date and time functions]])
| <code>{{samp|$}}[[date (Unix)|date]]</code><br /><code>[[time()]]</code>
| <code>{{samp|$}}[[date (Unix)|date]]</code><br /><code>[[time()]]</code>
| 1 s
| 1 s
| rowspan="3" |(*)<br/> 1 January 1970 (to [[Year 2038 problem|19 January 2038]] prior to Linux 5.9) to 2 July 2486 (Since Linux 5.10)<br/>1 January 1970 to 4 December AD 292,277,026,596
| rowspan="3" |(*)<br /> 1 January 1970 (to [[Year 2038 problem|19 January 2038]] prior to Linux 5.9) to 2 July 2486 (Since Linux 5.10)<br />1 January 1970 to 4 December AD 292,277,026,596
|-
|-
| <code><span class="plainlinks">{{man|sh|gettimeofday|SUS||inline}}()</span></code>
| <code><span class="plainlinks">{{man|sh|gettimeofday|SUS||inline}}()</span></code>

Revision as of 09:45, 1 June 2023

यूनिक्स तिथि (यूनिक्स) कमांड

कंप्यूटर विज्ञान और कंप्यूटर प्रोग्रामिंग में, सिस्टम समय समय बीतने के बारे में कंप्यूटर सिस्टम की धारणा का प्रतिनिधित्व करता है। इस अर्थ में, समय में कैलेंडर पर बीतने वाले दिनों को भी शामिल किया जाता है।

सिस्टम समय को एक सिस्टम क्लॉक द्वारा मापा जाता है, जिसे आमतौर पर टिक की संख्या की एक साधारण गिनती के रूप में लागू किया जाता है, जो कि कुछ मनमाने ढंग से शुरू होने की तारीख से स्थानांतरित हो गया है, जिसे युग कहा जाता है। उदाहरण के लिए, यूनिक्स और पॉज़िक्स-संगत सिस्टम सिस्टम समय ("यूनिक्स टाइम") को एन्कोड करते हैं क्योंकि 1 जनवरी 1970 00:00:00 यूटी पर यूनिक्स युग की शुरुआत के बाद से लीप सेकंड के अपवाद के साथ सेकंड की संख्या। सिस्टम जो विंडोज एपीआई के 32-बिट और 64-बिट संस्करणों को लागू करते हैं, जैसे कि विंडोज 9एक्स और विंडोज एनटी, सिस्टम समय दोनों सिस्टम समय के रूप में प्रदान करते हैं, जो वर्ष/माह/दिन/घंटा/मिनट/सेकंड/मिलीसेकंड मान के रूप में प्रतिनिधित्व करते है, और FILETIME, 1 जनवरी 1601 00:00:00 यूटी के बाद से 100-नैनोसेकंड टिक्स की गिनती के रूप में प्रस्तुत किया गया है, जैसा कि प्रोलेप्टिक ग्रेगोरियन कैलेंडर में माना गया है।

सिस्टम समय को कैलेंडर समय में परिवर्तित किया जा सकता है, जो मानवीय समझ के लिए अधिक उपयुक्त है। उदाहरण के लिए, युग की शुरुआत के बाद से यूनिक्स प्रणाली का समय 1000000000 सेकंड कैलेंडर समय 9 सितंबर 2001 01:46:40 यूटी में अनुवाद करता है। लाइब्रेरी सबरूटीन्स जो इस तरह के रूपांतरणों को संभालते हैं, वे समय क्षेत्र, डेलाइट सेविंग टाइम (डीएसटी), लीप सेकंड और उपयोगकर्ता की लोकेल सेटिंग के समायोजन से भी निपट सकते हैं। पुस्तकालय दिनचर्या भी आम तौर पर प्रदान की जाती है जो कैलेंडर समय को सिस्टम समय में परिवर्तित करती है।

अन्य समय माप

सिस्टम समय से निकटता से संबंधित प्रक्रिया समय है, जो निष्पादन प्रक्रिया द्वारा खपत कुल सीपीयू समय की गणना है। यह उपयोगकर्ता और सिस्टम सीपीयू समय में विभाजित हो सकता है, क्रमशः उपयोगकर्ता कोड और सिस्टम कर्नेल कोड को निष्पादित करने में लगने वाले समय का प्रतिनिधित्व करता है। प्रक्रिया समय सीपीयू निर्देशों या घड़ी चक्रों का एक मिलान है और आमतौर पर दीवार के समय से कोई सीधा संबंध नहीं है।

फाइल सिस्टम प्रत्येक फाइल और निर्देशिका के फाइल नियंत्रण ब्लॉक (या इनोड) में टाइमस्टैम्प को संग्रहीत करके फ़ाइलों के निर्माण, संशोधन और/या एक्सेस किए जाने के समय को ट्रैक करता है।

इतिहास

अधिकांश पहली पीढ़ी के पर्सनल कंप्यूटर तारीखों और समय को ट्रैक नहीं करते थे। इनमें वे सिस्टम शामिल थे जो सीपी/एम ऑपरेटिंग सिस्टम चलाते थे, साथ ही साथ एप्पल II, बीबीसी माइक्रो, और कमोडोर पीईटी के शुरुआती मॉडल भी शामिल थे। ऐड-ऑन पेरिफेरल बोर्ड जिसमें ऑनबोर्ड बैटरी बैकअप के साथ रीयल-टाइम क्लॉक चिप्स शामिल थे, आईबीएम पीसी और एक्सटी के लिए उपलब्ध थे, लेकिन आईबीएम एटी पहला व्यापक रूप से उपलब्ध पीसी था जो मदरबोर्ड में निर्मित डेट/टाइम हार्डवेयर से सुसज्जित था। कंप्यूटर नेटवर्क की व्यापक उपलब्धता से पहले, सिस्टम समय को ट्रैक करने वाले अधिकांश पर्सनल कंप्यूटर सिस्टम केवल स्थानीय समय के संबंध में ऐसा करते थे और विभिन्न समय क्षेत्रों के लिए अनुमति नहीं देते थे।

वर्तमान तकनीक के साथ, अधिकांश आधुनिक कंप्यूटर स्थानीय नागरिक समय को ट्रैक करते हैं, जैसा कि वीसीआर, डीवीआर, केबल टीवी रिसीवर, पीडीए, पेजर, सेल फोन, फैक्स मशीन, जैसे कई अन्य घरेलू और टेलीफोन आंसरिंग मशीन, कैमरा, कैमकॉर्डर, एयर कंडीशनर और माइक्रोवेव ओवन निजी उपकरण करते है।

एम्बेडेड सिस्टम (जैसे कि रास्पबेरी पाई, अरुडिनो, और अन्य समान सिस्टम) के भीतर काम करने वाले माइक्रोकंट्रोलर्स में हमेशा समय का ट्रैक रखने के लिए आंतरिक हार्डवेयर नहीं होता है। ऐसे कई नियंत्रक तंत्र बाह्य समय के ज्ञान के बिना कार्य करते हैं। जिन लोगों को इस तरह की जानकारी की आवश्यकता होती है, वे आम तौर पर बाहरी स्रोत से वर्तमान समय प्राप्त करके, जैसे समय सर्वर या बाहरी घड़ी से, या उपयोगकर्ता को वर्तमान समय में मैन्युअल रूप से प्रवेश करने के लिए संकेत देकर अपने आधार समय को प्रारंभ करते हैं।

कार्यान्वयन

सिस्टम क्लॉक को आमतौर पर एक प्रोग्रामेबल इंटरवल टाइमर के रूप में लागू किया जाता है जो समय-समय पर सीपीयू को बाधित करता है, जो तब टाइमर इंटरप्ट सर्विस रूटीन (बाधित सेवा दिनचर्या) को निष्पादित करना शुरू कर देता है। यह रूटीन आमतौर पर सिस्टम क्लॉक (एक साधारण काउंटर) में एक टिक जोड़ता है और अन्य आवधिक हाउसकीपिंग कार्यों (प्रीमेशन, आदि) को उस कार्य पर लौटने से पहले संभालता है जो सीपीयू रुकावट से पहले निष्पादित कर रहा था।

सिस्टम समय को पुनः प्राप्त करना

निम्नलिखित सारणी विभिन्न ऑपरेटिंग सिस्टम, प्रोग्रामिंग भाषाओं और अनुप्रयोगों में सिस्टम समय को पुनः प्राप्त करने के तरीकों को दर्शाती है। (*) द्वारा चिन्हित मान सिस्टम पर निर्भर हैं और कार्यान्वयन के दौरान भिन्न हो सकते हैं। सभी तिथियों को ग्रेगोरियन या प्रोलेप्टिक ग्रेगोरियन कैलेंडर तिथियों के रूप में दिया गया है।

ध्यान दें कि कार्यान्वयन के समय के मापन का संकल्प इस तरह के मापों की समान सटीकता का अर्थ नहीं है। उदाहरण के लिए, एक सिस्टम वर्तमान समय को माइक्रोसेकंड में मापे गए मान के रूप में लौटा सकता है, लेकिन वास्तव में केवल 100 हर्ट्ज (10 एमएस) की आवृत्ति के साथ अलग-अलग घड़ी की टिक को समझने में सक्षम हो सकता है।

ऑपरेटिंग सिस्टम

ऑपरेटिंग सिस्टम कमांड अथवा फंक्शन रेसोलुशन युग या श्रेणी
एंड्रॉयड java.lang.System.currentTimeMillis() 1 ms 1 जनवरी 1970
बायोस (आईबीएम पीसी) INT 1Ah, AH=00h[1] 54.9254 ms
18.2065 Hz
वर्तमान दिन की मध्यरात्रि
INT 1Ah, AH=02h[2] 1 s वर्तमान दिन की मध्यरात्रि
INT 1Ah, AH=04h[3] 1 day 1 जनवरी 1980 से 31 दिसंबर 1999 या 31 दिसंबर 2079 (सिस्टम निर्भर)
सीपी/एम प्लस System Control Block:[4]
scb$base+58h, Days since 31 December 1977
scb$base+5Ah, Hour (BCD)
scb$base+5Bh, Minute (BCD)
scb$base+5Ch, Second (BCD)
1 s 31 दिसंबर 1977 से 5 जून 2157 तक
BDOS function 69h> (T_GET):[5]
word, Days since 1 January 1978
byte, Hour (BCD)
byte, Minute (BCD)
byte, Second (BCD)
डॉस (माइक्रोसॉफ्ट) C:\>DATE
C:\>TIME
10 ms 1 जनवरी 1980 से 31 दिसंबर 2099 तक
INT 21h, AH=2Ch SYSTEM TIME[6]
INT 21h, AH=2Ah SYSTEM DATE[7]
आईओएस (एप्पल) CFAbsoluteTimeGetCurrent()[8] < 1 ms 1 जनवरी 2001 ± 10,000 वर्ष
मैक ओएस CFAbsoluteTimeGetCurrent()[9] < 1 ms[10][note 1] 1 जनवरी 2001 ±10,000 वर्ष
ओपन वीएमएस SYS$GETTIM() 100 ns[11] 17 नवंबर 1858 से 31 जुलाई 31,086
gettimeofday() 1 μs[12] 1 जनवरी 1970 से 7 फरवरी 2106
clock_gettime() 1 ns[12]
जेड/ओएस STCK[13]: 7–187  2−12 μs
244.14 ps[13]: 4–45, 4–46 
1 जनवरी 1900 से 17 सितंबर 2042 यूटी
STCKE 1 जनवरी 1900 से 36,765 ई. तक
यूनिक्स , पॉज़िक्स

( सी तिथि और समय कार्यों को भी देखें )

$date
time()
1 s (*)

1 जनवरी 1970 ( लिनक्स 5.9 से पहले 19 जनवरी 2038 तक) से 2 जुलाई 2486 (लिनक्स 5.10 के बाद से) 1 जनवरी 1970 से 4 दिसंबर एडी 292,277,026,596

gettimeofday() 1 μs
clock_gettime() 1 ns
ओएस/2 DosGetDateTime() 10 ms 1 जनवरी 1980 से 31 दिसंबर 2079
विंडोज GetSystemTime() 1 ms 1 जनवरी 1601 से 14 सितंबर 30828, 02:48:05.4775807
GetSystemTimeAsFileTime() 100 ns
GetSystemTimePreciseAsFileTime()

प्रोग्रामिंग भाषाएं और अनुप्रयोग

Operating system Command or function Resolution Epoch or range
Android java.lang.System.currentTimeMillis() 1 ms 1 January 1970
BIOS (IBM PC) INT 1Ah, AH=00h[1] 54.9254 ms
18.2065 Hz
Midnight of the current day
INT 1Ah, AH=02h[2] 1 s Midnight of the current day
INT 1Ah, AH=04h[3] 1 day 1 January 1980 to 31 December 1999 or 31 December 2079 (system dependent)
CP/M Plus System Control Block:[4]
scb$base+58h, Days since 31 December 1977
scb$base+5Ah, Hour (BCD)
scb$base+5Bh, Minute (BCD)
scb$base+5Ch, Second (BCD)
1 s 31 December 1977 to 5 June 2157
BDOS function 69h> (T_GET):[5]
word, Days since 1 January 1978
byte, Hour (BCD)
byte, Minute (BCD)
byte, Second (BCD)
DOS (Microsoft) C:\>DATE
C:\>TIME
10 ms 1 January 1980 to 31 December 2099
INT 21h, AH=2Ch SYSTEM TIME[6]
INT 21h, AH=2Ah SYSTEM DATE[7]
iOS (Apple) CFAbsoluteTimeGetCurrent()[8] < 1 ms 1 January 2001 ±10,000 years
macOS CFAbsoluteTimeGetCurrent()[9] < 1 ms[10][note 1] 1 January 2001 ±10,000 years[10][note 1]
OpenVMS SYS$GETTIM() 100 ns[11] 17 November 1858 to 31 July 31,086[14]
gettimeofday() 1 μs[12] 1 January 1970 to 7 February 2106[15]
clock_gettime() 1 ns[12]
z/OS STCK[13]: 7–187  2−12 μs
244.14 ps[13]: 4–45, 4–46 
1 January 1900 to 17 September 2042 UT[16]
STCKE 1 January 1900 to AD 36,765[17]
Unix, POSIX
(see also C date and time functions)
$date
time()
1 s (*)
1 January 1970 (to 19 January 2038 prior to Linux 5.9) to 2 July 2486 (Since Linux 5.10)
1 January 1970 to 4 December AD 292,277,026,596
gettimeofday() 1 μs
clock_gettime() 1 ns
OS/2 DosGetDateTime() 10 ms 1 January 1980 to 31 December 2079[18]
Windows GetSystemTime() 1 ms 1 January 1601 to 14 September 30828, 02:48:05.4775807
GetSystemTimeAsFileTime() 100 ns
GetSystemTimePreciseAsFileTime()


प्रोग्रामिंग लैंग्वेज और एप्लिकेशन

Language/Application Function or variable Resolution Epoch or range
Ada Ada.Calendar.Clock 100 μs to
20 ms (*)
1 January 1901 to 31 December 2099 (*)
AWK systime() 1 s (*)
BASIC, True BASIC DATE, DATE$
TIME, TIME$
1 s (*)
Business BASIC DAY, TIM 0.1 s (*)
C (see C date and time functions) time() 1 s (*)[note 2] (*)[note 2]
C++ std::time()
std::chrono::system_clock::now()
1 s (*)[note 2]
1 ns (C++11, OS dependent)
(*)[note 2]
C# System.DateTime.Now[19]
System.DateTime.UtcNow[20]
100 ns[21] 1 January 0001 to 31 December 9999
CICS ASKTIME 1 ms 1 January 1900
COBOL FUNCTION CURRENT-DATE 1 s 1 January 1601
Common Lisp (get-universal-time) 1 s 1 January 1900
Delphi (Borland) date
time
1 ms
(floating point)
1 January 1900
Delphi
(Embarcadero Technologies)[22]
System.SysUtils.Time[23] 1 ms 0/0/0000 0:0:0:000 to 12/31/9999 23:59:59:999 [sic]
System.SysUtils.GetTime[24] (alias for System.SysUtils.Time)
System.SysUtils.Date[25] 0/0/0000 0:0:0:000 to 12/31/9999 0:0:0:000 [sic]
System.DateUtils.Today[26]
System.DateUtils.Tomorrow[27]
System.DateUtils.Yesterday[28]
System.SysUtils.Now[29] 1 s 0/0/0000 0:0:0:000 to 12/31/9999 23:59:59:000 [sic]
System.SysUtils.DayOfWeek[30] 1 day 1 to 7
System.SysUtils.CurrentYear[31] 1 year (*)
Emacs Lisp (current-time) 1 μs (*) 1 January 1970
Erlang erlang:system_time(), os:system_time()[32] OS dependent, e.g. on Linux 1ns[32] 1 January 1970[32]
Excel date() ? 0 January 1900[33]
Fortran DATE_AND_TIME
SYSTEM_CLOCK
(*)[34]

[35]

1 January 1970
CPU_TIME 1 μs
Go time.Now() 1 ns 1 January 0001
Haskell Time.getClockTime 1 ps (*) 1 January 1970 (*)
Data.Time.getCurrentTime 1 ps (*) 17 November 1858 (*)
Java java.util.Date()
System.currentTimeMillis()
1 ms 1 January 1970
System.nanoTime()[36] 1 ns arbitrary[36]
Clock.systemUTC()[37] 1 ns arbitrary[38]
JavaScript, TypeScript (new Date()).getTime()
Date.now()
1 ms 1 January 1970
Matlab now 1 s 0 January 0000[39]
MUMPS $H (short for $HOROLOG) 1 s 31 December 1840
LabVIEW Tick Count 1 ms 00:00:00.000 1 January 1904
Get Date/Time in Seconds 1 ms 00:00:00.000 1 January 1904
Objective-C [NSDate timeIntervalSinceReferenceDate] < 1 ms[40] 1 January 2001 ±10,000 Years[40]
OCaml Unix.time() 1 s 1 January 1970
Unix.gettimeofday() 1 μs
Extended Pascal GetTimeStamp() 1 s (*)
Turbo Pascal GetTime()
GetDate()
10 ms (*)
Perl time() 1 s 1 January 1970
Time::HiRes::time[41] 1 μs
PHP time()
mktime()
1 s 1 January 1970
microtime() 1 μs
PureBasic Date() 1 s 1 January 1970 to 19 January 2038
Python datetime.now().timestamp() 1 μs (*) 1 January 1970
RPG CURRENT(DATE), %DATE
CURRENT(TIME), %TIME
1 s 1 January 0001 to 31 December 9999
CURRENT(TIMESTAMP), %TIMESTAMP 1 μs
Ruby Time.now()[42] 1 μs (*) 1 January 1970 (to 19 January 2038 prior to Ruby 1.9.2[43])
Smalltalk Time microsecondClock
(VisualWorks)
1 s (ANSI)
1 μs (VisualWorks)
1 s (Squeak)
1 January 1901 (*)
Time totalSeconds
(Squeak)
SystemClock ticksNowSinceSystemClockEpoch
(Chronos)
SQL CURDATE() or CURRENT DATE
CURTIME() or CURRENT TIME
GETDATE()
NOW() or CURRENT TIMESTAMP
SYSDATE()
3 ms 1 January 1753 to 31 December 9999 (*)
60 s 1 January 1900 to 6 June 2079
Standard ML Time.now() 1 μs (*) 1 January 1970 (*)
TCL [clock seconds] 1 s 1 January 1970
[clock milliseconds] 1 ms
[clock microseconds] 1 μs
[clock clicks] 1 μs (*) (*)
Windows PowerShell Get-Date[44][45] 100 ns[21] 1 January 0001 to 31 December 9999
[DateTime]::Now[19]
[DateTime]::UtcNow[20]
Visual Basic .NET System.DateTime.Now[19]
System.DateTime.UtcNow[20]
100 ns[21] 1 January 0001 to 31 December 9999


यह भी देखें

टिप्पणियाँ

  1. 1.0 1.1 1.2 The Apple Developer Documentation is not clear on the precision & range of CFAbsoluteTime/CFTimeInterval, except in the CFRunLoopTimerCreate documentation which refers to 'sub-millisecond at most' precision. However, the similar type NSTimeInterval appears to be interchangeable, and has the precision and range listed.
  2. 2.0 2.1 2.2 2.3 The C standard library does not specify any specific resolution, epoch, range, or datatype for system time values. The C++ library encompasses the C library, so it uses the same system time implementation as C.


संदर्भ

  1. 1.0 1.1 Ralf D. Brown (2000). "Int 0x1A, AH=0x00". Ralf Brown's Interrupt List.
  2. 2.0 2.1 Ralf D. Brown (2000). "Int 0x1A, AH=0x02". Ralf Brown's Interrupt List.
  3. 3.0 3.1 Ralf D. Brown (2000). "Int 0x1A, AH=0x04". Ralf Brown's Interrupt List.
  4. 4.0 4.1 "CP/M Plus (CP/M Version 3.0) Operating System Guide" (PDF).
  5. 5.0 5.1 "BDOS system calls".
  6. 6.0 6.1 Ralf D. Brown (2000). "Int 0x21, AH=0x2c". Ralf Brown's Interrupt List.
  7. 7.0 7.1 Ralf D. Brown (2000). "Int 0x21, AH=0x2a". Ralf Brown's Interrupt List.
  8. 8.0 8.1 "Time Utilities Reference". iOS Developer Library. 2007.
  9. 9.0 9.1 "Time Utilities Reference". Mac OS X Developer Library. 2007.
  10. 10.0 10.1 10.2 "Time Utilities - Foundation". Apple Developer Documentation. Retrieved 6 July 2022.
  11. 11.0 11.1 Ruth E. Goldenberg; Lawrence J. Kenah; Denise E. Dumas (1991). VAX/VMS Internals and Data Structures, Version 5.2. Digital Press. ISBN 978-1555580599.
  12. 12.0 12.1 12.2 12.3 "VSI C Run-Time Library Reference Manual for OpenVMS Systems" (PDF). VSI. November 2020. Retrieved 2021-04-17.
  13. 13.0 13.1 13.2 13.3 z/Architecture Principles of Operation (PDF). Poughkeepsie, New York: International Business Machines. 2007.
  14. "Why is Wednesday, November 17, 1858 the base time for OpenVMS (VAX VMS)?". Stanford University. 24 July 1997. Archived from the original on 24 July 1997. Retrieved 8 January 2020.
  15. "OpenVMS and the year 2038". HP. Retrieved 2021-04-17.
  16. IBM intends to extend the date range on future systems beyond 2042. z/Architecture Principles of Operation, (Poughkeepsie, New York:International Business Machines, 2007) 1-15, 4-45 to 4-47.
  17. "Expanded 64-bit time values". IBM. Retrieved 2021-04-18.
  18. Jonathan de Boyne Pollard. "The 32-bit Command Interpreter". On OS/2 Warp 4, date and time can both operate well beyond the year 2000, and even well beyond the year 2038, and in fact up to the year 2079, which is the limit for OS/2 Warp 4's real-time clock.
  19. 19.0 19.1 19.2 "DateTime.Now Property". Microsoft Docs.
  20. 20.0 20.1 20.2 "DateTime.UtcNow Property". Microsoft Docs.
  21. 21.0 21.1 21.2 "DateTime.Ticks Property". Microsoft Docs.
  22. "Date and Time Support". Embarcadero Developer Network. 2013.
  23. "System.SysUtils.Time". Embarcadero Developer Network. 2013.
  24. "System.SysUtils.GetTime". Embarcadero Developer Network. 2013.
  25. "System.SysUtils.Date". Embarcadero Developer Network'. 2013.
  26. "System.DateUtils.Today". Embarcadero Developer Network. 2013.
  27. "System.DateUtils.Tomorrow". Embarcadero Developer Network. 2013.
  28. "System.DateUtils.Yesterday". Embarcadero Developer Network. 2013.
  29. "System.SysUtils.Now". Embarcadero Developer Network. 2013.
  30. "System.SysUtils.DayOfWeek". Embarcadero Developer Network. 2013.
  31. "System.SysUtils.CurrentYear". Embarcadero Developer Network. 2013.
  32. 32.0 32.1 32.2 "Time and Time Correction in Erlang". www.erlang.org.
  33. "XL2000: Early Dates on Office Spreadsheet Component Differ from Excel". Microsoft Support. 2003. Archived from the original on 24 October 2007. In the Microsoft Office Spreadsheet Component, the value 0 evaluates to the date December 30, 1899 and the value 1 evaluates to December 31, 1899. ... In Excel, the value 0 evaluates to January 0, 1900 and the value 1 evaluates to January 1, 1900.
  34. "SYSTEM_CLOCK". Intel Fortran Compiler 19.0 Developer Guide and Reference. 29 April 2019. Retrieved 23 July 2019.
  35. "SYSTEM_CLOCK — Time function". The GNU Fortran Compiler. Retrieved 27 October 2011.
  36. 36.0 36.1 "System.nanoTime() method". Java Platform, Standard Edition 6: API Specification. 2015. Retrieved 23 July 2019.
  37. "Clock.systemUTC() and other methods". Java Platform, Standard Edition 8: API Specification. 2014. Retrieved 15 January 2015.
  38. "JSR-310 Java Time System". Java Platform, Standard Edition 8: API Specification. 2014. Retrieved 15 January 2015.
  39. "Matlab Help".
  40. 40.0 40.1 "NSTimeInterval - Foundation". Apple Developer Documentation.
  41. Douglas Wegscheild, R. Schertler, and Jarkko Hietaniemi, "Time::HiRes". CPAN - Comprehensive Perl Archive Network. 2011. Retrieved 27 October 2011.
  42. James Britt; Neurogami. "Time class". Ruby-Doc.org: Help and documentation for the Ruby programming language. Scottsdale, AZ. Retrieved 27 October 2011.
  43. Yugui (18 August 2010). "Ruby 1.9.2 is released". The new 1.9.2 is almost compatible with 1.9.1, except these changes: ... Time is reimplemented. The bug with year 2038 is fixed.
  44. "Using the Get-Date Cmdlet". Microsoft Docs. Retrieved 23 July 2019.
  45. "Windows PowerShell Tip of the Week – Formatting Dates and Times". Microsoft Docs. Retrieved 23 July 2019.


बाहरी संबंध