DateTime format for web server

I have put together a simple Apache2 web server on SUSE 11.1 using mono (ASP.NET). I noticed though that when I go to my sample web page that the time format is in military time. How can I configure apache to display in normal US time, that is am and pm.

:\ :slight_smile:

This is not an Apache issue, it’s your Mono app that displays it. So you should look at your program.

That does not seem right, it works fine on a Windows 2000 server. I have posted my code below, it is very simple and I got it out of a book.

:\

Code:

<html>
<head>
<title>Testing ASP.NET/C#</title>
<script runat=“server” language=“C#”>
protected void Page_Load(Object s, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString();
}
</script>

</head>
<body>
<h2>Testing ASP.NET and C# on my first ASP.NET web page</h2>

Today’s Date:
<asp:Label runat=“server” id=“lblTime” />
</body>
</html>

Apache still has nothing to do with it. The app runtime libraries get the time (in seconds from 1/1/1970, no human formatting) from the OS, and translate it to whatever the human needs to see. I’d look at settings for the Mono runtime. It may be related to locale, since obviously the presentation of date depends on the natural language in use in that locale.

Remember that Mono is a .NET workalike, not an exact copy. You may have to tweak some things yourself.

Oh, okay thanks.

:slight_smile: