This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.