So I don’t think that there’s any bug ... BUT I think we just have to first understand what’s happening.
The modx guys implemented the [[+dob]] field with timestamps instead of a date string and most of us expect it to work with date strings hence the frustration. Which means that when you enter the data into the field, modx expects a timestamp rather than a date string and if you edit using the backend, the calendar widget also converts your date into a timestamp, even though it gave you a user friendly way of choosing a date but feeding a timestamp.
For those who don’t know what a timestamp is I found a good explanations here; http://www.go4expert.com/forums/showthread.php?t=3595
Unix time, or POSIX time, is a system for describing points in time. It is widely used not only on Unix-like operating systems but in many other computing systems, including the Java programming language. It is an encoding of UTC, and is sufficiently similar to a linear representation of the passage of time that it is frequently mistaken for one.
The Unix timestamp is widely used in PHP. [color=red]It is the amount of seconds between January 1st 1970 00:00:00 (Unix Epoch) and the present time, to the closest second.[/color] As you can imagine, after over 35 years it is now quite a big number!
Unix time is one of the things is handled differently on Windows servers compared to *nix servers. On a Linux server [color=red]the timestamp can be positive or negative, representing before and after the Unix Epoch.[/color] Windows servers however produces -1 instead of a negative timestamp, or in PHP 5.1, it produces false.
So now realising whats happening who has an idea of how we can format the timestamp when reading it ... I thought of using output modifiers but theoretically that solves only one part of the problem and so far.
For output modifiers check here; http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+
Date formats with modx check here; http://rtfm.modx.com/display/revolution20/Date+Formats
PHP has to functions for what we are trying to do though
- strtotime - converts date string to a timestamp
- strftime - converts timestamp to date string
As an alternative to PHP stuff Modx provides output modifiers (see link above), which can help you when reading the timestamp from the [[+dob]] field to an appropriate representation. At least that should handle the reading part.
To input a value for [[+dob]] I did a test by feeding a timestamp into the [[+dob]] placeholder and VWALA! the backend got it right!
So if there is some way to let a user use a calendar selector that fills the input with a timestamp.
Hope I’m making sense.
So people...timestamps. (This shoulda been in the docs since its giving people hell, which makes me wonder if there is a way the modx guys can help us out. Coz they are the ones who made the rules. Without the rules in the docs, we are flying blind.)