Decalage horaire en flash

cs_fabrice88 Messages postés 97 Date d'inscription lundi 17 décembre 2001 Statut Membre Dernière intervention 7 août 2015 - 1 févr. 2009 à 13:37
cs_Burnside Messages postés 1132 Date d'inscription mercredi 28 août 2002 Statut Membre Dernière intervention 6 mars 2020 - 5 févr. 2009 à 13:11
bonjour,
j'ai créer une petite horlage en flash et j'ai un probleme de décalage horaire.
au lieu d'avoir 10h30 par exemple j'ai 9h30.
existe 'il une solution pour reglé se probleme ou ais-je fait une erreur dans mon code ?

voilà mon programme :

Code:
onClipEvent (enterFrame) {
heure = new Date();
_root.horloge.secondes = heure.getSeconds();
_root.horloge.minutes = heure.getMinutes();
_root.horloge.heures = heure.getHours();
_root.horloge.s._rotation = _root.horloge.secondes*6;
_root.horloge.m._rotation = _root.horloge.minutes*6;
if (_root.horloge.heures >= 12) {
_root.horloge.h._rotation = (_root.horloge.heures + _root.horloge.m._rotation/360)*30;
} else {
_root.horloge.h._rotation = (_root.horloge.heures-12)*30;
}
}

Photos Vosges : Regardez, respirez, aimez les Vosges
http://www.photos-vosges.fr<

1 réponse

cs_Burnside Messages postés 1132 Date d'inscription mercredi 28 août 2002 Statut Membre Dernière intervention 6 mars 2020
5 févr. 2009 à 13:11
Slt,

Moi j'utilise ceci :
BEhour = myDate.getUTCHours() + 1;
BEmin = myDate.getUTCMinutes();
BEsec = myDate.getUTCSeconds();
if (BEhour == 24)
{
BEhour = "00";
}
if (BEhour == 25)
{
BEhour = "01";
}
if (length(BEhour) == 1)
{
BEhour = "0" + (myDate.getUTCHours() + 1);
}
if (length(BEmin) == 1)
{
BEmin = "0" + myDate.getUTCMinutes();
}
if (length(BEsec) == 1)
{
BEsec = "0" + myDate.getUTCSeconds();
}

Bàt,
Burnside.

..:: Enjoy living in hell ::..
http://www.art-line.be
0
Rejoignez-nous