Skip to main content

Posts

Showing posts from March, 2022

Making sure my linux system does not wake up on suspend

Had this annoying problem in my linux Xubuntu 20.04 when putting on suspend the system then starts even though I put it in suspend and sleep. Using acpitool to turn off wake-up from unnecessary devices. But the problem the change is not permanent and does not survive a restart. So I used cron @reboot to make sure it is always off: @reboot acpitool -W 3 && acpitool -W 9 && acpitool -W 10 && acpitool -W 17 && acpitool -W 63 && acpitool -W 64 && acpitool -W 66 && acpitool -W 68 && acpitool -W 74    

MySQL Test Timezone Script

 CREATE TABLE tzt( id MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, ts TIMESTAMP NOT NULL, dt DATETIME NOT NULL ); SELECT @@global.time_zone, @@session.time_zone; SET GLOBAL time_zone = 'Asia/Jerusalem'; SET SESSION time_zone = 'Asia/Jerusalem'; INSERT INTO tzt SET ts='2021-08-22 13:30:00', dt='2021-08-22 13:30:00'; SELECT * FROM tzt\G SET GLOBAL time_zone = 'America/Sao_Paulo'; SET SESSION time_zone = 'America/Sao_Paulo'; SELECT * FROM tzt\G