更改系统DateTime [英] changing the system DateTime
本文介绍了更改系统DateTime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用.net
Can we change the system date programmatically using .net
推荐答案
是的,以编程方式更改系统日期.
但是,如果这样做,您可能会在头部受到很大的打击.当然,如果您的软件开始和我一起玩,我会打动您的.
如果您认为必须这样做:那么Google应该是您的第一个停靠港.
http://blog.sb2. fr/post/2009/03/16/How-to-Change-System-Date-Programmatically-With-C.aspx [
Yes.
But if you do, you will probably get hit about the head, a lot. Certainly if your software starts playing with me clock, I will hit you around the head lots.
If you feel you must: then Google should have been your first port of call.
http://blog.sb2.fr/post/2009/03/16/How-to-Change-System-Date-Programmatically-With-C.aspx[^]
[edit]Where did the first character go? - originalGriff[/edit]
String arg = @"/C \"time hh:min:sec\"";
extern process : cmd.exe
arg =@ "/C \"data dd-mm-[yy]yy\"";
这篇关于更改系统DateTime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文