After the first patching attempt to display Buddhist era in Drupal correctly, I found an annoying issue as a result at Drupal Thailand while trying to edit my own comment. The node's date is formatted by format_date() using custom format with Y. Unfortunately, the date string is converted back to seconds using strtotime() which doesn't recognize Buddhist era, says 2550. I had to change 2550 to 2007 to save that comment.
I got a request to fix problem regarding lack of Buddhist era in Drupal for so long. This should be classified as a bug of PHP and Drupal. PHP provides only strftime() which recognizes locale setting, setlocale(). Unfortunately, Drupal uses only gmdate(). That's the problem. So I have to patch common.inc to handle Y and y alternatively.