一想到這幾天大過年的,我每次都會玩一下柏德之門三部曲,這遊戲經由第三方套件–BGT-WeiDU,套件整合了「劍灣傳奇」、「柏德之門I」與「柏德之門II」,最值得一提的是裡面包含了N種額外的劇情,當然也有戀愛的情節(比較隱晦一點),想嘗試戀愛滋味的宅男們,建議一定要玩,而且老電腦都跑得起來哦! 想辦法組裝玩玩吧–提示:GOG Galaxy、BG1(the original saga)、BG2。
# 可計算同一天連線小時(小數第二位)
SELECT username ,DATE_FORMAT(start_date, "%Y%m%d") the_same_date, cast(sum(TIMESTAMPDIFF(MINUTE,start_date,end_date))/60 as decimal(9,2)) overtime_hour
from guacamole_connection_history
group by username,the_same_date
order by username,the_same_date desc
#若資料庫時區沒有調整,預設是UTC,可暫時使用CONVERT_TZ轉換正確時區
SELECT username ,DATE_FORMAT(CONVERT_TZ(start_date,'+00:00','+08:00'), "%Y%m%d") the_same_date, cast(sum(TIMESTAMPDIFF(MINUTE,start_date,end_date))/60 as decimal(9,2)) overtime_hour
from guacamole_connection_history
group by username,the_same_date
order by username,the_same_date desc
# 排除每次連線低於30分鐘
SELECT username ,DATE_FORMAT(start_date, "%Y%m%d") the_same_date, cast(sum(TIMESTAMPDIFF(MINUTE,start_date,end_date))/60 as decimal(9,2)) overtime_hour
from guacamole_connection_history
where TIMESTAMPDIFF(MINUTE,start_date,end_date) >= 30
group by username,the_same_date
order by username,the_same_date desc
#若資料庫時區沒有調整,預設是UTC,可暫時使用CONVERT_TZ轉換正確時區
SELECT username ,DATE_FORMAT(CONVERT_TZ(start_date,'+00:00','+08:00'), "%Y%m%d") the_same_date, cast(sum(TIMESTAMPDIFF(MINUTE,start_date,end_date))/60 as decimal(9,2)) overtime_hour
from guacamole_connection_history
where TIMESTAMPDIFF(MINUTE,start_date,end_date) >= 30
group by username,the_same_date
order by username,the_same_date desc
為了員工健康,要設定上線時間
另外酪梨醬預設60分鐘沒有任何遠端連線,會整個登出。 可搭配遠端桌面連線相關設定
vi guacamole.properties
##### 修改30分鐘整個網頁登出(必須在沒有任何連線的情況下)
api-session-timeout:30