Sat Aug 20 14:00:00 ACT 2011
it alerts a plus 10 hours date as
Sun Aug 21 2011 00:00:00 GMT+0500 (Pakistan Standard Time)
Any ideas on what I may be doing wrong or should I post it to java forums.
Date.toString() <-- what alert does
Returns the date in a readable string format based on the user's date/time settings.
Joined: Dec 28, 2009
There are two parts to the solution of this problem, but first let me rephrase my problem.
I have certain data against logDate and hour in a data base table. The data looks like below
logDate hr data
2011-09-04 00 12
2011-09-04 01 313
2011-09-04 02 713 .... and so on
The solution to this problem would be to get the date from database, convert it to UTC date and show it as UTC date in the front end.
I hope it helps someone else. If I am mistaken in something, please let me know.