如何在C#中获取ACTUAL日期时间而不是系统日期时间 [英] how to get ACTUAL date time and not system date time in C#

查看:61
本文介绍了如何在C#中获取ACTUAL日期时间而不是系统日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在C中获得实际日期时间而不是系统日期时间

i我试图这样做



hi ,
how to get ACTUAL date time and not system date time in C#
i am trying to do like this

DateTime.Now.ToString("dd-mm-yyyy");





如果系统日期错误,那么我的应用程序已获得当前系统日期..

请告诉我如何从互联网上获取日期..



If the system date is wrong, then my application has getting current system date ..
please tell me how to get date from internet ..

推荐答案

您有两种选择:

选项1:

从互联网上获取时间 [ ^ ]

选项2:

从数据库服务器获取。





    - Amy
You have two option:
Option 1:
Get Time from internet[^]
Option 2:
Get it from your DB server.


   --Amy


我认为您误解了这个问题。我怀疑你是在本地运行你的代码,对吧?如果是这样,它将立即获得您的系统DateTime,因为您正在使用本地服务器,您的系统。一旦你部署它,它将从你部署它的机器,服务器获得它。



问候..
I think you misunderstood the issue. I suspect you are running your code locally,right? If so, it will get your system DateTime right now as you are using local server,your system. Once you deploy it, it will get it from the machine where you deployed it,server.

Regards..


这篇关于如何在C#中获取ACTUAL日期时间而不是系统日期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆