[Mono-aspnet-list] DateTime format in Mono
rjlopes at gmail.com
Fri May 8 04:14:34 EDT 2009
The format depends on the culture you are using.
If you want it to print the same result on both systems you have to
make sure that the Thread.CurrentThread.CurrentCulture or
Thread.CurrentThread.CurrentUICulture is the same on both systems.
2009/5/8 Z.K. <blue-eagle2 at lycos.com>
> I have a simple ASP.NET web page on my home server. On a Windows 2000 server
> it prints the date as am or pm, on my SUSE 11.1 with Mono server it prints
> the date in military time as in 16:23:44. I have posted a similar post on
> the SUSE forum and they seem to think it is a mono configuration issue
> dealing with a localization issue. I know it is not the OS as the time on
> the Gnome taskbar is displayed correctly.
> So, my question is how to configure mono to use U.S. DateTime format. I
> have listed my code below.
> :working: :confused:
> <title>Testing ASP.NET/C#</title>
> <script runat="server" language="C#">
> protected void Page_Load(Object s, EventArgs e)
> lblTime.Text = DateTime.Now.ToString();
> <h2>Testing ASP.NET and C# on my first ASP.NET web page</h2>
> Today's Date:
> <asp:Label runat="server" id="lblTime" />
> View this message in context: http://www.nabble.com/DateTime-format-in-Mono-tp23438987p23438987.html
> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
More information about the Mono-aspnet-list