TACTIC Open Source
Tactic Timezone - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: Tactic Timezone (/showthread.php?tid=182)



Tactic Timezone - listy - 11-23-2020

Hi!
Anyone can help me how to setup TACTIC to use local time, and not UTC?

Thanks!


RE: Tactic Timezone - remkonoteboom - 11-27-2020

Could you give an example? Currently, internally, TACTIC always converts timestamps to naive GMT datetime objects. The reason they are naive (and assumes GMT) is because in the past we had a number of Python modules just crash when using non-naive datetime objects. We convert all timestamps to this so that all operations are with consistent datetimes. On display, it should convert to the local timezone.


RE: Tactic Timezone - listy - 12-02-2020

Hi!

I have my Ubuntu with set up timezone to Europe/Moscow in is in System time, and in PostgreSQL configs.

But because it is differs from UTC to 3 hours i always got penalty in tactic when i checkin files, add tasks, notes or etc (except tactic scheduler, it uses right time!)

So when i create task, and pass there 12.30, i got task create 3 hours back 9.30 in the DB.

[attachment=105]


RE: Tactic Timezone - listy - 12-22-2020

Any thoughts on how You can reproduce this?


RE: Tactic Timezone - listy - 12-22-2020

In search.py module on line number 3339:

Code:
            if isinstance(value, datetime.datetime):
                if value.tzinfo:
                    value = SPTDate.convert_to_timezone(value, 'UTC')
it is converting all timestamp values to UTC.
Even if i have right date in the database table.
It is only case for search.eval() or search.get_sobjects().
In the webb tables it shows right timestamp, without converting to UTC.