[Mono-aspnet-list] DateTime format in Mono
blue-eagle2 at lycos.com
Fri May 8 04:46:31 EDT 2009
Thanks, that is what I needed. I just added the Culture="en-US" to a page
directive at the top of my web page and it works great now.
> 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
>> it prints the date as am or pm, on my SUSE 11.1 with Mono server it
>> the date in military time as in 16:23:44. I have posted a similar post
>> 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
>> 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:
>> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
>> Mono-aspnet-list mailing list
>> Mono-aspnet-list at lists.ximian.com
> Ricardo Lopes
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
View this message in context: http://www.nabble.com/DateTime-format-in-Mono-tp23438987p23442289.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list