当我执行以下查询时,它会使用时区
更新日期字段16:19:11 DEBUG: Found object: name_of_the_object
16:19:11 ERROR: Error: Failed to move the mouse
16:19:11 ERROR: Exception type: RuntimeError
16:19:11 ERROR: Exception message: Failed to move the mouse
16:19:11 ERROR: Stack trace: path/my_squish_wrapper.py , Line : 170, Func.Name : mouse_move, Message : mouseMove(my_obj, x, y)']
当我查询时:
update person set hiredate='2018-06-18 23:59:59-04:00' where id=5684
我获得了hiredate的以下值:select * from person where id=5684
(在我的时区+5:30)
但我想以
执行查询2018-06-19 09:29:59
并运行select查询,我将hiredate作为:update person set hiredate=now()::date + time '23:59:59-04:00' where id=5684
请帮助我如何
答案 0 :(得分:2)
time
是time without time zone
的缩写。尝试
UPDATE person
SET hiredate = now()::date + time with time zone '23:59:59-04:00'
WHERE id = 5684;
答案 1 :(得分:-1)
我认为这就是你想要的
update person set hiredate= timestamp with
time zone now()::date + time '23:59:59-04:00'
where id=5684;