If you are seeing this message, it is possible the page did not load properly. Please hit reload/refresh on your browser.
If you still see this message, you probably do not have a browser that supports web standards, although its content is accessible to any browser or Internet device.

Cool Tips & Tricks Cool Tips & Tricks

Help Communities:
Help Forums Bug Base
<< Prev Topic | Next Topic >>
Cool Tips & Tricks ::: Javascripts and Java ::: Help with time zone html
New Topic    Add Reply
Topic: Help with time zone html  (?)  Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend
onewildcat

Registered User
ezSupporter
Posts: 1
Posted: 11/25/05 9:57 pm    
Help with time zone html
I live in the eastern time zone -5. I have went here p079.ezboard.com/fcooltipsntricksfrm11.showMessage?topicID=56.topic and copied all my scripts and pasted them in the proper html box.

I changed my var GMToffset = -5;

and have my date format set at var DateForm =4;

Now my board time is showing 3 hours behind for me. Did I set something wrong, or is there something else I need to do or change? TIA


  reply to this message

Nutrocker

ezboard Moderator
ezSupporter
Posts: 16582
Posted: 11/26/05 3:35 pm    
Re: Help with time zone html
Hello and welcome, I will move this topic to the Javascript help forum.


  reply to this message

onewildcat

Registered User
ezSupporter
Posts: 1
Posted: 11/30/05 8:16 pm    
Re: Help with time zone html
Scripts are not allowed


  reply to this message

onewildcat

Registered User
ezSupporter
Posts: 1
Posted: 11/30/05 8:27 pm    
Re: Help with time zone html
Oooops, Sorry about that! Thanks for moving my post.. Can someone please help me? I put this post up 4 or 5 days ago and no reply... I think i'm gonna go crazy with my time 3 hours behind.. I have both my html and control panel GMT set at -5. Is the control panel suppose to be set at -5 if your using the custom Html scripts? I live in Ohio -5 Eastern time zone..

Here's what I have in my custom html box ( I will leave off the script brackets so I can post it)..

Box 1


/* BEGIN EZURL */
ezURL = document.location.href.match(" /\/((?:p ub|b|p)([0-9">\/((?:p ub|b|p)([0-9]+)|beta|vanchau|inbox)\.ezboard\.com\/(b|f)([a-zA-Z0-9]+(?=frm[0-9]+)|[a-zA-Z0-9]+(?!frm[0-9]+))(frm[0-9]+|)(?:( ?:[\.]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:( ?:[\x3F]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:.*)");
try {
if (ezURL.length > 0) {
ezPub = ezURL[2].length > 0 ? ezURL[2] : ezURL[1];
ezFullPub = ezURL[1];
ezIsBoard = ezURL[3] == "b" ? true : false;
ezBoardID = ezURL[4];
ezForum = ezURL[5];
ezPage = ezURL[6];
ezQuery = ezURL[7];
}
} catch (e) { }
ezURL = null;
/* END EZURL */







/* CHANGE DATES TO LOCAL TIME */
function changeDates() {
if (!navigator.userAgent.toLowerCase().match("opera|safari")) {

// GMT offset

var GMToffset = -5;

/* DateForm:

0 = "m/d/yy"

1="m/d/yyyy"

2="d/m/yy"

3="d/m/yyyy"

4=if user date offset is from -4 to -8 hours (US), then use format 0, else use format 2 */

var DateForm = 4;

if (!ezIsBoard) {
if (!ezPage) {
alldh = document.getElementsByTagName("nobr") ;
} else {
alldh = document.getElementsByTagName("font") ;
}
} else {
alldh = document.getElementsByTagName("td") ;
}
for (an=0;an< alldh.length;an++) {
convertdate(alldh.item(an), GMToffset, DateForm);
}
}
}
function convertdate(oD, GMToffset, DateForm) {
try {
if (!isNaN(Date.parse(oD.innerHTML.replace("Posted\:","").replace(/[\(\)]/ig, "") ))) {
d = new Date();
if (DateForm == 4) {
if ((d.getTimezoneOffset() <= 480) && (d.getTimezoneOffset() >= 240)) {
DateForm = 0;
} else {
DateForm = 2;
}
}
dV = new Date(Date.parse(oD.innerHTML.replace(/[\(\)]/ig, "").replace("Posted:","") ) - (GMToffset * 1000 * 60 * 60) - (d.getTimezoneOffset() * 1000 * 60));
if (dV.getFullYear() < 1970) { dV.setYear(dV.getFullYear() + 100) };
switch (DateForm) {
case 0:
oD.innerHTML = (oD.innerHTML.indexOf("Posted:") != -1 ? "Posted: " : "") + (dV.getMonth()+1).toString() + "/" + dV.getDate().toString() + "/" + dV.getFullYear().toString().substr(2) + " " + (dV.getHours() > 12 ? dV.getHours()-12 : (dV.getHours() == 0 ? 12 : dV.getHours())).toString() + ":" + (dV.getMinutes() < 10 ? "0" + dV.getMinutes().toString() : dV.getMinutes().toString()) + (dV.getHours() >= 12 ? "pm" : "am") ;
break;
case 1:
oD.innerHTML = (oD.innerHTML.indexOf("Posted:") != -1 ? "Posted: " : "") + (dV.getMonth()+1).toString() + "/" + dV.getDate().toString() + "/" + dV.getFullYear().toString() + " " + (dV.getHours() > 12 ? dV.getHours()-12 : (dV.getHours() == 0 ? 12 : dV.getHours())).toString() + ":" + (dV.getMinutes() < 10 ? "0" + dV.getMinutes().toString() : dV.getMinutes().toString()) + (dV.getHours() >= 12 ? "pm" : "am") ;
break;
case 2:
oD.innerHTML = (oD.innerHTML.indexOf("Posted:") != -1 ? "Posted: " : "") + dV.getDate().toString() + "/" + (dV.getMonth()+1).toString() + "/" + dV.getFullYear().toString().substr(2) + " " + (dV.getHours() > 12 ? dV.getHours()-12 : (dV.getHours() == 0 ? 12 : dV.getHours())).toString() + ":" + (dV.getMinutes() < 10 ? "0" + dV.getMinutes().toString() : dV.getMinutes().toString()) + (dV.getHours() >= 12 ? "pm" : "am") ;
break;
case 3:
oD.innerHTML = (oD.innerHTML.indexOf("Posted:") != -1 ? "Posted: " : "") + dV.getDate().toString() + "/" + (dV.getMonth()+1).toString() + "/" + dV.getFullYear().toString() + " " + (dV.getHours() > 12 ? dV.getHours()-12 : (dV.getHours() == 0 ? 12 : dV.getHours())).toString() + ":" + (dV.getMinutes() < 10 ? "0" + dV.getMinutes().toString() : dV.getMinutes().toString()) + (dV.getHours() >= 12 ? "pm" : "am") ;
break;
}
}
} catch (e) { }
}
/* CHANGE DATES TO LOCAL TIME */


Box 4

changeDates();



  reply to this message

Nutrocker

ezboard Moderator
ezSupporter
Posts: 16606
Posted: 12/1/05 3:43 pm    
Re: Help with time zone html
change this to 0

var DateForm = 4;

e.g.
var DateForm = 0;


  reply to this message

onewildcat

Registered User
ezSupporter
Posts: 1
Posted: 12/1/05 6:30 pm    
Re: Help with time zone html
Ok, I changed to 0, but it didn't help.. My board is still showing 3 hours behind for me.. The time is right for a member I have in Scotland, Lol... I have another member in the -5 time zone and she said it's 3 hours behind for her also... Hmmm, this is strange.. My site is on P105 but it's a MBA site...


  reply to this message

Nutrocker

ezboard Moderator
ezSupporter
Posts: 16616
Posted: 12/2/05 3:37 pm    
Re: Help with time zone html
Could do with one of the script experts to look at this one.


  reply to this message

Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend

New Topic    Add Reply

jump to:
Topic Control Image::: Topic Commands
<< Prev Topic | Next Topic >>

Icon Legend

reply button:::Reply to Post Button   edit button:::Edit Post Button  delete button:::Delete Post Button (Moderator Only)

subscribe/unsubscribe to thread button:::Subscribe to Thread Button   email to friend button:::Email to Friend Button  



- Cool Tips & Tricks - Javascripts and Java -

Communitiesezboard Help Communities:

Help Forums Help Forums Bug Base Bug Base





Powered By ezboard® Ver. 7.32
Copyright ©1999-2007 ezboard, Inc.