Custom Date/Time attribute resets
PermalinkWhen the page is saved, the date reverts to Dec 31, 1969 and the time switches to 7pm (or maybe it was 4pm... definitely not the date I entered).
This is odd because the date/time show on the page properties screen in what I assume is the correct format. Then when the page is saved they reset.
Could this be a bug?
I think you're talking about printing the date to the page.
I'm talking about strictly within the c5 edit mode and the custom attributes panel.
The date/time changes on its own, like it isn't finding the value and is defaulting around epoch time. Very odd.
I noticed when coding simple addons I had to keep the formatting going "in" a specific format, which led me to having to strtotime() every date coming out.
Here are more specifics and how to replicate the issue:
Enter date/time using text entry as "6pm" (date is irrelevant for my purposes).
Save page. Time shows as expected on page.
Go into edit mode. Date/time show as:
6:00:00 PM on 4/19/2010 (the date the attribute was edited... c5 has created this string from my "6pm" entry)
Save page. Time shows as expected.
Go into edit mode. Date/time reset to:
4:00:00 PM on 12/31/1969 (always that time and date, no matter what time/date was originally added)
What's odd is that c5 is creating the date/time string which is then being misinterpreted. What I'm entering doesn't seem to affect the results.
Thanks, Rick
Good luck!
C