Click here to Skip to main content
16,008,954 members

Bugs and Suggestions

   

General discussions, site bug reports and suggestions about the site.

For general questions check out the CodeProject FAQs. To report spam and abuse Head to the Spam and abuse watch. If you wish to report a bug privately, especially those related to security, please email webmaster@codeproject.com

 
GeneralRe: Time [edited] Pin
PJ Arends25-Mar-05 12:15
professionalPJ Arends25-Mar-05 12:15 
GeneralCorrection Pin
Max Santos25-Mar-05 13:26
Max Santos25-Mar-05 13:26 
GeneralDone the easy way! Pin
Max Santos25-Mar-05 14:21
Max Santos25-Mar-05 14:21 
GeneralRe: Done the easy way! Pin
PJ Arends25-Mar-05 16:56
professionalPJ Arends25-Mar-05 16:56 
GeneralRe: Done the easy way! Pin
Nish Nishant26-Mar-05 16:40
sitebuilderNish Nishant26-Mar-05 16:40 
GeneralRe: Done the easy way! Pin
Max Santos27-Mar-05 5:45
Max Santos27-Mar-05 5:45 
GeneralRe: Time Pin
Michael Dunn25-Mar-05 15:39
sitebuilderMichael Dunn25-Mar-05 15:39 
GeneralRe: Time Pin
Max Santos25-Mar-05 15:41
Max Santos25-Mar-05 15:41 
done !

i have reworked the script. thing is done, can you give it a try?.

I dont need to think of time zones or even daylight saving...

All i need is to get the date diff from server and client and apply that date diff to the date in question.

<br />
function ConvertTime(svrdate,anydate)<br />
{<br />
clientDate = new Date();<br />
serverDate = new Date(svrdate);<br />
date = new Date(anydate);<br />
<br />
datediff = (clientDate.valueOf()-serverDate.valueOf())/1000/60; //minutes<br />
date.setMinutes(date.getMinutes()+datediff); //the convertion<br />
<br />
d = date.getDate();<br />
m = date.getMonth()+1;<br />
h = date.getHours();<br />
n = date.getMinutes();<br />
sTime = h+":"+((n<10)?"0"+n:n)+" ";<br />
sDate = new String(date.toUTCString());<br />
//because string allways have the same format i place hardcoded values instead of making a search<br />
sDate = sDate.substr(5,6); <br />
sDate+=" '"+(String(date.getFullYear()).substr(2,2));<br />
sTime+=sDate;<br />
document.write(sTime);<br />
}<br />
<br />
<script>ConvertTime("<%=Now%>","03-25-2005 17:06")</script>



http://xwega.com/codeproject/timezone.asp[^]
GeneralRe: Time Pin
Chris Maunder31-Mar-05 3:47
cofounderChris Maunder31-Mar-05 3:47 
GeneralRe: Time Pin
Max Santos31-Mar-05 8:41
Max Santos31-Mar-05 8:41 
GeneralRe: Time Pin
Alexander M.,31-Mar-05 12:32
Alexander M.,31-Mar-05 12:32 
GeneralCurrently Online Pin
John L. DeVito17-Mar-05 15:31
professionalJohn L. DeVito17-Mar-05 15:31 
GeneralRe: Currently Online Pin
Alexander M.,31-Mar-05 12:29
Alexander M.,31-Mar-05 12:29 
GeneralI want merchandise! Pin
charlieg15-Mar-05 6:18
charlieg15-Mar-05 6:18 
GeneralRe: I want merchandise! Pin
Michael P Butler15-Mar-05 6:29
Michael P Butler15-Mar-05 6:29 
GeneralRe: I want merchandise! Pin
charlieg15-Mar-05 6:51
charlieg15-Mar-05 6:51 
GeneralRe: I want merchandise! Pin
Colin Angus Mackay15-Mar-05 7:30
Colin Angus Mackay15-Mar-05 7:30 
GeneralRe: I want merchandise! Pin
charlieg15-Mar-05 7:36
charlieg15-Mar-05 7:36 
GeneralRe: I want merchandise! Pin
Colin Angus Mackay15-Mar-05 10:17
Colin Angus Mackay15-Mar-05 10:17 
GeneralRe: I want merchandise! Pin
toxcct7-Apr-05 20:57
toxcct7-Apr-05 20:57 
GeneralIIS+ASP cannot handle high volumne access? Pin
Huisheng Chen15-Mar-05 4:52
Huisheng Chen15-Mar-05 4:52 
GeneralRe: IIS+ASP cannot handle high volumne access? Pin
Andy Brummer17-Mar-05 11:41
sitebuilderAndy Brummer17-Mar-05 11:41 
GeneralSlow site... Pin
NeverHeardOfMe15-Mar-05 1:10
NeverHeardOfMe15-Mar-05 1:10 
GeneralRe: Slow site... Pin
David Wulff15-Mar-05 1:43
David Wulff15-Mar-05 1:43 
GeneralBasically unusable Pin
NetDevKing17-Mar-05 3:55
NetDevKing17-Mar-05 3:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.