# TimeZoneOffset Problems

**URL:** https://forum.kirupa.com/t/timezoneoffset-problems/160865
**Category:** flash
**Created:** [August 30, 2005, 3:14am UTC](https://forum.kirupa.com/t/timezoneoffset-problems/160865 "2005-08-30T03:14:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flashmatic](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@flashmatic](https://forum.kirupa.com/u/flashmatic)
#### Post date: [August 30, 2005, 3:14am UTC](https://forum.kirupa.com/t/timezoneoffset-problems/160865/1 "2005-08-30T03:14:06Z")

</div>

I have a current time (EST) function in my website thats supposed to show the time in Washington DC. I thought that the timezone offset is -4 so i wrote this code;

dt = new Date();  
UTC = trace(dt.getUTCHours()+(-4) + “:” + dt.getUTCMinutes());  
myTime = dt.getUTCHours()+(-4) + “:” + dt.getUTCMinutes()

However after 8:00PM the time starts to act up and shows incorrectly, for example when it is 8:00PM the time shows “-4:0”, when it is 10:00 it shows “-2:0” , also not showing the second digit for the minutes. Please help.
