Click here to Skip to main content
12,831,378 members (38,707 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
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 17-Jan-13 21:33pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.
BC @ CV 18-Jan-13 10:01am
Cool! I didn't know such a thing existed. +5
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170326.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100