-
Looking for help with Timezone clock.
I'm looking for a digital clock code, That works off a time zone not my computers time.
The time zone is Paris UTC+1
Any help is awesome Thank you.
-
Prid - Outing
Actionscript 2.0:
Actionscript Code:
onEnterFrame = function(){ time = new Date(); timeZoneOffset = 1; // change this to change the offset hours = time.getUTCHours()+timeZoneOffset; minutes = time.getUTCMinutes(); seconds = time.getUTCSeconds(); if(hours >= 24){ hours -= 24; } if(hours < 10){ hours = "0"+hours; } if(minutes < 10){ minutes = "0"+minutes; } if(seconds < 10){ seconds = "0"+seconds; } trace(hours+":"+minutes+":"+seconds); }
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Hey thanks for response but I forgot to mention that it has to be actionscript3.0
Originally Posted by Nig 13
Actionscript 2.0:
Actionscript Code:
onEnterFrame = function(){ time = new Date(); timeZoneOffset = 1; // change this to change the offset hours = time.getUTCHours()+timeZoneOffset; minutes = time.getUTCMinutes(); seconds = time.getUTCSeconds(); if(hours >= 24){ hours -= 24; } if(hours < 10){ hours = "0"+hours; } if(minutes < 10){ minutes = "0"+minutes; } if(seconds < 10){ seconds = "0"+seconds; } trace(hours+":"+minutes+":"+seconds); }
-
Prid - Outing
Actionscript Code:
import flash.events.Event;
addEventListener(Event.ENTER_FRAME, showTime);
function showTime(e:Event){ var time:Date = new Date(); var timeZoneOffset:Number = 1; // change this to change the offset var hours = time.getUTCHours()+timeZoneOffset; var minutes = time.getUTCMinutes(); var seconds = time.getUTCSeconds(); if(hours >= 24){ hours -= 24; } if(hours < 10){ hours = "0"+hours; } if(minutes < 10){ minutes = "0"+minutes; } if(seconds < 10){ seconds = "0"+seconds; } trace(hours+":"+minutes+":"+seconds); }
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|