Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Is it possible to get real date (not system date) without any connection to internet? I developed my application by C#. DateTime.Now gets system date but I want to know real date because system date may be wrong. Is it possible?how to do this?
Posted
Comments
[no name] 18-Jan-13 3:14am    
Computer is a dumpbox. it only understands the configurations made by administrator. If you set the date to some other date then that will reflect there.

No. You can use SNTP to get the real date and time (see this[^] and this[^]) with an internet connection. If you have a network connection that the computer can use where a computer exists that does have an internet connection, then you can use that as an SNTP server for the client. Otherwise, you are stuck with the System's date/time.
 
Share this answer
 
Comments
BC @ CV 18-Jan-13 10:01am    
Cool! I didn't know such a thing existed. +5
Hi,

The computer know which we set on it,(if we set some date for it, then it show the same); but if it didn't know the date then how can It produce date for you for any programming language.
eg. If I put you in a dark room for several days without any gadget/communication(clock) then Can you identify what is real time or date, same for computer(if you Initialize wrong clock to computer then it return you wrong time)

you cant get real date without setting on your computer.

So If you can create your clock then you can set it first time with real date and you will returned always real date time.

Thank You.
Please mark as ans. if it helps you.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900