I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Inde på netcoder.dk har (en anden)Søren lagt ind et script soren@grenz.dk
Det ser sådan ud : <% REM Funktionen worldtimes start Function worldtimes(gmt) Dim storbyminus, storbyplus, a storbyplus = Array(\"London\", \"Paris\", \"Cairo\", \"Moskva\", \"Baku\", \"Karachi\", \"Dacca\", \"Bangkok\", \"Hong Kong\", \"Tokyo\", \"Sydney\", \"Moumea\", \"Wellington\") storbyminus = Array(\"Samao\", \"Hawaii\", \"Juneau\", \"San Francisco\", \"Denver\", \"Chicago\", \"New York\", \"Caracas\", \"Rio De Janeiro\", \"Recife\", \"Azores\") For a = -11 to 12 If a < 0 then Response.Write \"<TR><TD>\"& Dateadd(\"h\",a-gmt,Now) &\"</TD><TD>\"& storbyminus(a+11) &\"</TD><TD ALIGN=\"\"RIGHT\"\">\"& a &\"</TD></TR>\"& VbCrLf IF a >= 0 Then Response.Write \"<TR><TD>\"& Dateadd(\"h\",a-gmt,Now) &\"</TD><TD>\"& storbyplus(a) &\"</TD><TD ALIGN=\"\"RIGHT\"\">\"& a &\"</TD></TR>\"& VbCrLf Next End Function REM Funktionen worldtimes slut %>
<P></DIV> </FORM> <DIV ALIGN=\"center\"> <A HREF=\"elninodefault.htm\">Back to El Nino Home</A></P>
<P><A NAME=footnote></A><TABLE CELLPADDING=10 WIDTH=\"95%\" align=Center> <TR> <TD> <P><FONT SIZE=\"+1\" COLOR=\"#FF8040\"><B><I>The Time Zone Problem</I></B></FONT></P>
<CENTER><I>Current versions of JavaScript do not report the correct time zone, for one of several reasons.</I></CENTER>
<P>First, if Daylight Time is in effect on the system, this causes a one hour error in the reported time zone.</P>
<P>Second, MSIE 3.0, Netscape 3.0 Beta, and Netscape 2.0 do three different things with this quantity (and there are probably other differences in browsers I haven\'t tested). Netscape 2.0 always reports an incorrect value. Netscape browsers return a non-integer value for the number of minutes between GMT and the local zone -- this is obviously impossible.</P>
<P>The final release of Netscape Navigator (3.0p) reverses the sign of the time zone, so people who live in the Western Hemisphere appear to be living in the Eastern Hemisphere and vice versa! I long for the good old days when computer programmers <I>wrote</I> and then <I>released</I> their programs, instead of the other way around.</P>
<P>All I can say is, World Clock tries to get the correct time zone value, but it will not be correct on some browsers. You may have to manually select your time zone. Sorry!</P>
<P><B>NEW:</B> JavaScript World Clock v 2.0 attempts to detect the browser and automatically work around the Netscape reverse-time bug, which has been blindly carried over into the new Netscape 4.0.</P> </TD> </TR> </TABLE> </P></CENTER>
<P></DIV> <SCRIPT LANGUAGE=JavaScript><!--- hide this // copyright (c) 1996, P. Lutus lutusp@arachnoid.com // Windows 95 will not report the correct time zone while daylight time is in effect, // Netscape 3.0 doesn\'t return a multiple of minutes * 60, // Netscape 2.0 will not report it correctly at all. var disp_ampm = 1; var disp_dst = 0; var start = 1;
// this next line works around a long-standing Netscape bug
// all Netscape browsers after version 2
var reverse_tz = ((navigator.appName == \"Netscape\") && (navigator.appVersion.substring(0,1) != \"2\"));
function get_tz(x) { var tzoff,now; now = new Date(); tzoff = now.getTimezoneOffset()/60; // get hour offset if(reverse_tz) { tzoff = -tzoff; // isn\'t this inelegant? } sgn = (tzoff < 0); // get sign tzoff = Math.abs(tzoff); // take absolute value tzoff = Math.ceil(tzoff); // get nearest whole hour (corrects a Netscape 3.0 bug) tzoff = (sgn)?-tzoff:tzoff; // restore sign return(tzoff); } function auto_tz() { var tzoff = get_tz(); var sgn = (tzoff < 0)?\"-\":\"+\"; var q = Math.abs(tzoff); idl = (tzoff * 3600000.0) + 39600000.0; // get offset to GMT -11 in milliseconds, the first time zone document.set_tz.current.value = document.set_tz.zone.options[tzoff+12].text + \" (automatic)\"; return tzoff; } function new_tz() { tzoff = document.set_tz.zone.options.selectedIndex - 12; if((tzoff >= -11) && (tzoff <= 12)) { idl = (tzoff * 3600000.0) + 39600000.0; // get offset to GMT -11 in milliseconds, the first time zone document.set_tz.current.value = document.set_tz.zone.options[tzoff+12].text + \" (manual)\"; } else { if((tzoff == 13) || (tzoff == -12)) { tzoff = auto_tz(); document.set_tz.current.value = document.set_tz.zone.options[tzoff+12].text + \" (automatic)\"; } } } auto_tz(); // set initial value daynames = \"SunMonTueWedThuFriSat\"; function set_dst(x) { month = x.getMonth()+1; // Jan = 0, so add 1 if ((month >= 4) && (month <= 10)) { // set default Daylight Savings Time for these months disp_dst = 1; } document.clock.elements[3-disp_dst].checked = 1; // click either standard or daylight time } function ldg_zero(x) { if (x < 10) { x = \"0\" + x; } return(x); } function format_date(x) { month = x.getMonth()+1; // Jan = 0, so add 1 dom = x.getDate(); // day of month dow = x.getDay(); // day of week year = x.getYear(); hour = x.getHours(); year = (year > 50)?1900+year:2000+year; ampm = \"\"; if(disp_ampm) { ampm = (hour > 11)?\"PM\":\"AM\"; hour %= 12; hour = (hour < 1)?hour+12:hour; } hour = ldg_zero(hour); minute = ldg_zero(x.getMinutes()); second = ldg_zero(x.getSeconds()); dow3 = dow * 3; dt = \"\"; if (disp_dst) { dt = \"(DT)\"; } return(daynames.substring(dow3,dow3+3)+\" \"+month+\"/\"+dom+\"/\"+year+\" \"+hour+\":\"+minute+\":\"+second+\" \"+ampm+\" \"+dt); } function update_clock() { now = new Date(); if(start) { set_dst(now); start = 0; } q = idl; // set var q to previously calculated first time zone offset if(disp_dst) { q -= 3600000.0; // add 1 hour for DST } now.setTime(now.getTime() - q); // set clock to GMT -11 for(i = 0;i < 24;i++) { // cycle through 24 time zones document.clock.elements[i+4].value = format_date(now); // skip the 4 radio buttons in the form now.setTime(now.getTime() + 3600000.0); } setTimeout(\'update_clock()\', 999); }
update_clock(); // first time // end hide --></SCRIPT></P> </BODY> </HTML>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.