惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
D
Docker
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
Project Zero
Project Zero
Engineering at Meta
Engineering at Meta
J
Java Code Geeks
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Simon Willison's Weblog
Simon Willison's Weblog
S
Security Affairs
NISL@THU
NISL@THU
T
Tor Project blog
A
About on SuperTechFans
宝玉的分享
宝玉的分享
腾讯CDC
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Privacy & Cybersecurity Law Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
P
Privacy International News Feed
雷峰网
雷峰网
C
Cyber Attacks, Cyber Crime and Cyber Security
Vercel News
Vercel News
Cisco Talos Blog
Cisco Talos Blog
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
L
LINUX DO - 热门话题
Microsoft Security Blog
Microsoft Security Blog
Latest news
Latest news
C
Check Point Blog
有赞技术团队
有赞技术团队
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
云风的 BLOG
云风的 BLOG
SecWiki News
SecWiki News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
爱范儿
爱范儿
月光博客
月光博客
V
Vulnerabilities – Threatpost
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
C
Cisco Blogs
Webroot Blog
Webroot Blog
S
Security @ Cisco Blogs

博客园 - kevin

[转]软件开发者面试百问 招聘c#工程师3名-深圳 [编评]从08软件行业薪酬行情聊“软件已经走下圣坛?” SQLServer数据库的备份/恢复的3中策略实例 .Net混淆研究(二)---主流工具的比较分析 WebService 操作超时的问题及其解决办法 - kevin - 博客园 【编选】单元测试error MSB3113的解决办法 [收集]C# 3.0,3.5 相关资源下载 网络负载平衡(NLB)资料收集 .Net混淆研究(一)---基本原理和利弊 .Net构建于使用web service 实例 [转载]索引的优点和缺点----数据库设计、面试必看 警惕招聘诈骗 网络一大抄,无耻的网站 珠海软件环境如何?东方海外呢? “深圳退保潮”之你知道吗? 设计模式-看 "泡妞之桥梁模式" 随想 [推荐][转]小菜编程成长记 一篇好文解释为何房价如此高,肉价涨得这么快[转帖]
关于时间转字符串的格式设置的几种策略
kevin · 2008-06-05 · via 博客园 - kevin

1。最好的方式是在全局定义DateFormat,然后每次在日期格式化时使用,DateTimeobj.ToString(formate);
   
2.在进程加载之处设置全局语言设置和时间设置,例如:
     System.Globalization.CultureInfo cut = new System.Globalization.CultureInfo("zh-CN", true);
        cut.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd";
        cut.DateTimeFormat.LongDatePattern  = "yyyy-MM-dd HH:mm:ss";
        System.Threading.Thread.CurrentThread.CurrentCulture = cut;

3.如果是webService 或网站,可以通过在web.config中设置globale设定来设置语言:
eg:


<globalization culture="zh-CN" uiCulture="zh-CN" requestEncoding="utf-8" responseEncoding="utf-8" />

4.通过网站的Asp.Net设置来设置全局或指定目录的语言设置。 此设置理论上与3的效果一样,但笔者近日在Windows Server 2003 Enterprise x64 英文版 Os,然后按照了一个不完全的汉化包,按照os光盘自带framwork2.0后按照4设置无效但按照3却有效,尚未知明确原因。 同时在管理工具下没有“Microsoft .Net Framwork 2.0 设置(/configuration)”功能。即使按照了framework2.0中文语言包后问题依然如旧。

                                                                                                    Created By  kevin
其他参考文章:

http://www.cnblogs.com/luohuarenduli/archive/2007/05/31/766408.html
http://www.itpub.net/663310.html