If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Dates

I hate dates

So, I have stored dates in my SQL database using GETUTCDATE() which appears to be working fine.
I then created a function that basically gets the JavaScript milliseconds for any date I store. This was simply for doing sorting and filtering.

So, when I create a new Date() object in JavaScript using my milliseconds and call the toLocaleString() function, I get something like:

Tue Oct 30 2012 01:37:57 GMT+0000 (GMT STANDARD TIME)

now, what I would like is this.
I want it to show something like :

Tue Oct 30 2012 01:37:57

and if the person viewing my site has their regional settings set to GMT + 0200 I want the time to be displayed for them in their region:

Tue Oct 30 2012 03:37:57

I have been searching for ages and I just can't find anything to do it.
I thought that date.js would work, but it can't handle the "(GMT STANDARD TIME)" which is a shame.