# Current time as static variable

**URL:** <https://forum.kirupa.com/t/current-time-as-static-variable/272630>\
**Category:** flash\
**Created:** [October 7, 2008, 6:18am UTC](https://forum.kirupa.com/t/current-time-as-static-variable/272630 "2008-10-07T06:18:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaR](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@JoshuaR](https://forum.kirupa.com/u/JoshuaR)\
**Post date:** [October 7, 2008, 6:18am UTC](https://forum.kirupa.com/t/current-time-as-static-variable/272630/1 "2008-10-07T06:18:40Z")

</div>

Hi,  
I’m sure this is something simple, but if someone could point me in the right direction that’d be great.  
I’ve been trying to create a script that pulls the current time and turns it into a variable, the problem is the variable keeps updating as the time changes, where as I need it to remain static as the time that is was when the variable was first created…  
it’s just a simple:

```auto
var theTime = today.getTime();

```

Much appreciated. :hugegrin:
