PWI Server Status
BareBear - Lost City
Posts: 8 Arc User
Comments
-
That has been there for a while and it is broken b/c whoever made it obviously don't know how to force flash to display time in a particular timezone not the local time (which isn't that hard)0
-
LOL, nice catch, i never even noticed that. Yep, I had to learn how to do that for our guild site.0
-
Yes, I liked the old widget that showed all the servers. I've tried several ways of re-creating it and can't seem to.[SIGPIC][/SIGPIC]0
-
If you noticed that take a look at this b:chuckle[SIGPIC][/SIGPIC]
To be or not to be.
Current Goals: none.0 -
It's not done in Flash, it's done in JavaScript.
I sent the fixed JavaScript to FrankieRaye, but they haven't implemented it.
Then again, the servers themselves don't seem to be doing Daylight Saving Time properly, so my fixed code which does do Daylight Saving Time properly conflicts with the servers this week. b:chuckle[SIGPIC][/SIGPIC]
Visit the PWI wiki for the useful information. Stay at the PWI wiki for the pie. ;-)0 -
a mod posted in a thread and it's not locked afterwards? b:puzzled
Anyone else thinks this should be stickied?b:question
edit: and hello der Sang havnt seen you before0 -
DaKillanator - Raging Tide wrote: »a mod posted in a thread and it's not locked afterwards? b:puzzled
Anyone else thinks this should be stickied?b:question
edit: and hello der Sang havnt seen you beforeIt's not done in Flash, it's done in JavaScript.
I sent the fixed JavaScript to FrankieRaye, but they haven't implemented it.
Then again, the servers themselves don't seem to be doing Daylight Saving Time properly, so my fixed code which does do Daylight Saving Time properly conflicts with the servers this week. b:chuckle
Well it was originally in flash when I first saw it...
So they apparently did change something only to have it still not work0 -
Look at his sig, go ahead I'll wait...
omg did you see that? FREE PIE!!!b:faint0 -
It's not done in Flash, it's done in JavaScript.
I sent the fixed JavaScript to FrankieRaye, but they haven't implemented it.
Then again, the servers themselves don't seem to be doing Daylight Saving Time properly, so my fixed code which does do Daylight Saving Time properly conflicts with the servers this week. b:chuckle
Any chance we can get the script for making widgets on our guild sites? I would love to have a server status widget for the guildies.Take the time to look for your answer before you post like an idiot.
There are two kinds of people in this world...
There are those who panic,
And then there is us.
~ Sarah Jane Smith0 -
I dont know why, but I think I may have a problem with that server status. I'm in Brazil (GMT -3) and the status shows the west coast time as my own time and east coast +3 hours.
(Like, now its 3:37pm and the west coast shows 3:37 pm and East 6:37 pm). Thats not right, since west coast should be my time minus 4 hours (if I'm not mistaken).
Sorry about the english0 -
Rambox - Sanctuary wrote: »I dont know why, but I think I may have a problem with that server status. I'm in Brazil (GMT -3) and the status shows the west coast time as my own time and east coast +3 hours.
(Like, now its 3:37pm and the west coast shows 3:37 pm and East 6:37 pm). Thats not right, since west coast should be my time minus 4 hours (if I'm not mistaken).
Sorry about the english
GM's are already aware of this, but thanks!0 -
Allisandre - Sanctuary wrote: »Any chance we can get the script for making widgets on our guild sites? I would love to have a server status widget for the guildies.
First, remove the reference to "templates/common/js/time.js", my code modifies that code. Then replace everything after the line with that reference down to the "</script>" with this:<script type="text/javascript"> lt = new Date(); // Local time wct = new Date(); // West Coast time ect = new Date(); // East Coast time d = 0; setTimes(); setInterval("writeTime()", 1000); function dotime(unix, x){ now = new Date(); now.setTime(unix); hr= now.getHours(); mn= now.getMinutes(); se= now.getSeconds(); yr = now.getFullYear(); mo = now.getMonth(); dy = now.getDate(); var mths = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); if(se < 10) { se = '0'+se; } if(mn < 10) { mn = '0'+mn; } if(hr >= 12) { hr = hr - 12; if(hr == 0) { hr = 12; } else if (hr < 10) { hr = hr; } else { hr = hr; } am = 'PM'; } else { am = 'AM'; } if(dy < 10) { dy = '0'+dy; } if(hr == 0){ hr = 12; } //date_view_var =''+mths[mo]+' '+dy+', '+yr; time_view_var =hr+':'+mn+':'+se; if(x){ return am; }else{ return time_view_var; } } function writeTime(){ d += 1000; msecs = wct.getTime() + d; str = dotime(msecs, false); str2 = dotime(msecs, true); msecs = ect.getTime() + d; str3 = dotime(msecs, false); str4 = dotime(msecs, true); msecs = lt.getTime() + d; str5 = dotime(msecs, false); str6 = dotime(msecs, true); $('#pwi_stat_server_times').find('p').eq(0).find('span').eq(0).text(str + ' '); $('#pwi_stat_server_times').find('p').eq(0).find('em').eq(0).text(str2); $('#pwi_stat_server_times').find('p').eq(1).find('span').eq(0).text(str3 + ' '); $('#pwi_stat_server_times').find('p').eq(1).find('em').eq(0).text(str4); $('#my_time').text(str5 + ' ' + str6); } function setTimes(){ var lsm = new Date; var lso = new Date; var dst = 0; // convert to msec since Jan 1 1970 localTimeMsec = lt.getTime(); // obtain local UTC offset in minutes and convert to msec localOffset = lt.getTimezoneOffset() * 60000; // obtain UTC time in msec utc = localTimeMsec + localOffset; lsm.setMonth(2); // March lsm.setDate(1); var day = lsm.getDay(); // day of week of 1st if (day == 0) { // find 2nd Sunday lsm.setDate(8); } else { lsm.setDate(14-day); } lso.setMonth(10); // November lso.setDate(1); day = lso.getDay(); if (day > 0) { // find 1st Sunday lso.setDate(7-day); } if (lt < lsm || lt >= lso) { dst = 0; //Not Daylight Saving Time } else { dst = 1; //Daylight Saving Time } if (dst == 1) { //Daylight Saving Time wct.setTime(utc + (3600000*-7)); ect.setTime(utc + (3600000*-4)); } else { //Not Daylight Saving Time wct.setTime(utc + (3600000*-8)); ect.setTime(utc + (3600000*-5)); } } </script>
Short description of what that does, it gets the local time, figures out what GMT is from that, then gives the times for the East Coast and West Coast servers.
However, until they either fix the servers to do Daylight Saving Time properly or next week when DST ends, the above code will be off by an hour, since I assumed they were doing DST correctly. b:surrender Just modify the DST handling code if you want it to match the pre-2007 system for DST in the US if you want to match the servers.[SIGPIC][/SIGPIC]
Visit the PWI wiki for the useful information. Stay at the PWI wiki for the pie. ;-)0 -
I just noticed that I handle changing DST more or less properly, but I ignore the hour. So it sets the clock back at midnight local time, instead of 2 AM Pacific Time and 2 AM Eastern Time.
So, if the servers did do DST properly, my code would be off by an hour on the days DST start and end for some of the day in most time zones. Probably not a big deal, but I thought I should mention it.[SIGPIC][/SIGPIC]
Visit the PWI wiki for the useful information. Stay at the PWI wiki for the pie. ;-)0
Categories
- All Categories
- 181.9K PWI
- 697 Official Announcements
- 2 Rules of Conduct
- 264 Cabbage Patch Notes
- 61K General Discussion
- 1.5K Quality Corner
- 11.1K Suggestion Box
- 77.4K Archosaur City
- 3.5K Cash Shop Huddle
- 14.3K Server Symposium
- 18.1K Dungeons & Tactics
- 2K The Crafting Nook
- 4.9K Guild Banter
- 6.6K The Trading Post
- 28K Class Discussion
- 1.9K Arigora Colosseum
- 78 TW & Cross Server Battles
- 337 Nation Wars
- 8.2K Off-Topic Discussion
- 3.7K The Fanatics Forum
- 207 Screenshots and Videos
- 22.8K Support Desk