I am having an interesting problem with some birthdate data in my profile nodes. I am using Drupal 6.
There are two people: Ann has the following UNIX timestamp value stored in the db: 353026800 Her profile page renders it as '1981. March 10'. When I edit the node I see also this value.
Bete has the timestamp in the db: 484696800 His profile page renders it as '1985. May 11' but when I open the node for edit then I see 1985. May 12.' in the date edit box.
The profiles are rendered in a custom tpl.php and the according piece is as follows:
format_date($p->field_szuldat['value'], 'custom', 'Y. F. d.');
dpm the loaded node then I see that both fields have the same Europe/Budapest timezone. I see that Bete's birthdate is (not counting the days) is 1 hour before Ann's. But I see that Drupal somehow handles it and renders the values in the edit boxes properly. It might be related to DST because Bete was born in DST and Ann wasn't.
My question is: how could I make my template's date rendering also handle it properly?
I have read all the related comments to the topic, but they do not match my case because here an extra hour is being added to one of my dates.
The field I am talking about is a "Datestamp" with the following configuration: "No timezone correction" is set, the granularity is only year-month-date.