Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Fuso orario su getUTCHours

    Ciao a tutti,
    sto utilizzando uno script che mi restituisce l'ora internazionale grazie alla proprietà: getUTCHours

    però se volessi sommare 2 ore a getUTCHours come faccio?
    ho fatto diversi tentativi ma ancora non sono riuscito a venirne fuori potreste aiutarmi grazie lo scipt completo:


    codice:
    time = new Date(year, month, date, hour, min, sec, ms);
    n1 = time.getSeconds();
    s.gotoAndStop(n1);
    n2 = time.getMinutes();
    m.gotoAndStop(n2 + 1);
    n3 = int(time.getUTCHours());  
    if (n3 > 12)
    {
        n3 = n3 - 12;
    } // end if
    n3 = n3 * 5;
    n3 = int(n3 + n2 / 12);
    h.gotoAndStop(n3);
    n1 = time.getSeconds();
    s1.gotoAndStop(n1);
    n2 = time.getMinutes();
    m1.gotoAndStop(n2);
    n3 = int(time.getUTCHours());
    if (n3 > 12)
    {
        n3 = n3 - 12;
    } // end if
    n3 = n3 * 5;
    n3 = int(n3 + n2 / 12);
    h1.gotoAndStop(n3);

  2. #2
    che idiota che sono scusate potevo aspettare a mettere sto messaggio ho appena risolto:

    codice:
    time = new Date(year, month, date, hour, min, sec, ms);
    n1 = time.getSeconds();
    s.gotoAndStop(n1);
    n2 = time.getMinutes();
    m.gotoAndStop(n2 + 1);
    n3 = int(time.getUTCHours())+3; 
    if (n3 > 12)
    {
        n3 = n3 - 12;
    } // end if
    n3 = n3 * 5;
    n3 = int(n3 + n2 / 12);
    h.gotoAndStop(n3);
    n1 = time.getSeconds();
    s1.gotoAndStop(n1);
    n2 = time.getMinutes();
    m1.gotoAndStop(n2);
    n3 = int(time.getUTCHours());
    if (n3 > 12)
    {
        n3 = n3 - 12;
    } // end if
    n3 = n3 * 5;
    n3 = int(n3 + n2 / 12);
    h1.gotoAndStop(n3);
    Va Be spero alemo possa servire a qualcuno.. :rollo:

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.