[Anthill-pro] Server Date format
Chad Loder
anthill at loder.us
Thu Sep 6 19:10:00 CDT 2007
On Thu, Sep 06, 2007 at 04:50:54PM -0400, Steve Boone wrote:
> Mikal,
>
> This has been filed as a feature request. We currently have a user time
> zone setting, but have not implemented a date format.
A suggestion. A good cheap way to do this is to have the server send
the date/time to the browser in UTC format and then use JavaScript to
render this in a way that is sensitive to the browser user's locale
and timezone, along the following lines:
1) Server emits the date(s) into the page using JavaScript, e.g.:
<script>document.myDates['date1'] = 987434387;</script>
2) A script is also emitted which does something like:
function getLocalDate(dateName) {
var dt = parseInt(document.myDates[dateName], 10);
return new Date(dt).toLocaleString();
}
It really simplifies things because you don't need to track each user's
locale settings and timezone separately.
> On 9/5/07, Mikal Todd <mtodd at bravurasolutions.com> wrote:
> >
> > Hi,
> >
> > Is there any way of changing the date format on the web frontend from
> > mm/dd/yyyy to the European format of dd/mm/yyyy ? All our builds are in
> > the US format and its quite confusing.
> >
> > I'm guessing this can be setup using a server property?
> >
> > Thanks,
> >
> > Mikal Todd
> > Build and Release Manager
> > Bravura Solutions Limited
> > www.bravurasolutions.com.au
> >
> >
> > _______________________________________________
> > Anthill-pro mailing list
> > Anthill-pro at lists.urbancode.com
> > http://lists.urbancode.com/mailman/listinfo/anthill-pro
> >
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
More information about the Anthill-pro
mailing list