# User's Time Zone

## Capture the User's Time Zone

Leopard automatically sends the user's time zone as a request parameter  (`timeZone`) to Teneo. This is useful in that you might want to properly greet the user based on the time of day.&#x20;

To capture the time zone in Teneo add this script to Pre-processing.

```groovy
if (engineEnvironment.getParameter("timeZone")){
	Lib_sUserTimeZone = engineEnvironment.getParameter("timeZone")
}
```

Alter the `On top` script in the default Teneo TDR `Greeting` flow to the following. The user then will be correctly greeted based off the time of day.

```groovy
TimeZone timeZone = TimeZone.getTimeZone(Lib_sUserTimeZone);
iHour = Integer.parseInt(String.format('%tH', new GregorianCalendar(timeZone)));
```

<div align="left"><img src="https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-M7TmJ_0s5Qys6SJNrf8%2F-M7TnWCC6zqe-rbem2EM%2Fgreeting.png?alt=media&#x26;token=94eb27d0-ef40-46bb-8370-4424b2a993ae" alt="Greeting Message"></div>
