Android: Calendar items set to tentative

Yay, I got myself a Samsung Galaxy SII. Great phone running Android!

There's just one thing that annoys the shit out of me: When I create a new agenda item in my google agenda, it shows up in my thunderbird as "tentative". These items will have a lower opacity, which makes the agenda harder to read.

I've google'd around, and found a lot of complaints about this problem, but there's no solution to make appointments confirmed right away. And I'm definitely not opening all items in thunderbird to confirm them by hand.

There's a simple solution to this problem: I made Thunderbird render the agenda differently. Using the file userChrome.css, I set opacity to 100%. (If you don't know what userChrome.css is, read this page at The actual CSS is:
opacity: 1 !important;

Restart thunderbird and you're done.

This "solution" does not set any appointments to "confirmed". It just renders tentative appointments the same as confirmed items, so that you don't see the difference anymore.

© GeekLabInfo Android: Calendar items set to tentative is a post from You are free to copy materials from, but you are required to link back to

1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 5.00 out of 5)

WordPress timezone problems: fixed

I'm using WordPress as a framework for a website that reaches over 30.000 readers daily over several media. Some over the web, but most users receive posts by mail, sms or twitter using custom-made plugins. Since I can't have a broken mail sent to thousands of users, I rather don't upgrade WordPress, except when security issues have been found. Every single WordPress upgrade I've done has broken something, like when plugin hooks are renamed, and renamed back later....

Timezone support broken

After my latest upgrade, the sending queue got seriously screwed up. SMS messages that should have been sent around 8am, got send around midnight. Why? Because WordPress timezone support screws up the time!

WordPress gave me my WTF moment while testing with date(). I've been testing what was wrong, and came across a situation where a simple reload caused the timezone to shift 2 hours. This simple line of code echoed 1:30:00 at 1:30:00 while echoing 3:30:01 at 1:30:01:
<?php echo date("H:i:s"); ?>

This isn't such a problem for simple posts on a weblog, but for sending queued mail and sms messages this is fatal.

My solution

Screw WordPress. It'll get fixed in some future version of WordPress. For now I'll get a date I can actually trust from mysql:
$wpdb->getvar('select DATE_FORMAT(current_timestamp,"%H:%i:%s");');

I also replaced several other instances of date(), like:
"select * from wp_receipients where time_to_sent<".date("Hi")."'";
'select * from wp_receipients where time_to_sent<DATE_FORMAT(current_timestamp,"%H%i")';

© GeekLabInfo WordPress timezone problems: fixed is a post from You are free to copy materials from, but you are required to link back to

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Magento and safe mode

The e-commerce application magento, for some reason, expects to have a lot of permissions on every server. One thing I stumbled upon when trying to install magento, was the creation of /tmp/magento/var.

Since /tmp could be shared between all users, this may not be the safest way. That's why my servers don't allow access to /tmp, but have a personal /tmp-style directory instead.

I got the error:
[Thu Feb 04 21:24:21 2010] [error] [client] PHP Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/magento/var) is not within the allowed path(s): (/blah/blah/ in /blah/blah/ on line 214

The fix is very, very easy. But since I couldn't find anyone else posting the exact fix, I thought I'd do it.

in app/code/core/Mage/Core/Model/Config/Options.php on line 137, you find:
public function getSysTmpDir()
return sys_get_temp_dir();

Change it to:
public function getSysTmpDir()
return $_SERVER['DOCUMENT_ROOT'].'/your_secret_tmp_dir/';

© GeekLabInfo Magento and safe mode is a post from You are free to copy materials from, but you are required to link back to

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.00 out of 5)