# T\_stamp 1 hour different issue

**URL:** <https://forum.inductiveautomation.com/t/t-stamp-1-hour-different-issue/37909>\
**Category:** Ignition\
**Tags:** database, ignition80, scripting\
**Created:** [August 19, 2020, 1:34pm UTC](https://forum.inductiveautomation.com/t/t-stamp-1-hour-different-issue/37909 "2020-08-19T13:34:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawel.kondol1](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@pawel.kondol1](https://forum.inductiveautomation.com/u/pawel.kondol1)\
**Post date:** [August 19, 2020, 1:34pm UTC](https://forum.inductiveautomation.com/t/t-stamp-1-hour-different-issue/37909/1 "2020-08-19T13:34:01Z")

</div>

Hello,

I have problem with date.

I have simple script:

```auto
import datetime

t_stamp = datetime.datetime.now()
print (t_stamp)

# Run a query that will update the values of the row matching the id.
query = "INSERT INTO [Ignition].[dbo].[Test] (t_stamp) VALUES (?)"
args = [t_stamp]
print (args)
event.source.parent.getComponent('Popup Calendar').date = t_stamp
system.db.runPrepUpdate(query, args)
system.db.refresh(event.source.parent.getComponent('Table'), "data") **strong text**

```

This script adding t-stamp in to SQL database.

This is output from the script:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95491be72b9eb052e70617aa2f84b68878ce13da.png)

and it’s correct. However, when I qry sql it return this. ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e1546cc9fad104755b3ec39f166470cf04d1c82f.png) where first column is just time saved by Ignition and on the right is current time stamp from SQL. As you can see there is 1 hour difference.

Did anybody faced similar problem?

Just to highlight SQL server time is the same as Ignition time.

Regards  
Pawel
