Susan, I’m learning in trial-by-fire mode so please forgive my questions for what may be obvious ... So, the TV I mention uses the unixtime widget. I used this as it seemed the only way to get my own date field to jive with ditto. Is that not outputting a timestamp as I would think?
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
-
☆ A M B ☆
- 24,524 Posts
You are correct. The date input type does not store a timestamp, as I thought it did. If you need a timestamp output, select the "Unixtime" widget. It will convert the date the "date" input stored in the database to a Unix timestamp that can then be parsed properly.
Ahhh, I think I understand — so even though my TV already uses the unixtime widget, it is because it has input type "date" that it’s not parsable using strftime() via DateTime. However, I’m not sure how to deal with it. I need the date input type for front-end purposes so the user can use the calendar to input article dates. How can I get the TV data back into readable form (essentially reversing the effects of the unixtime widget)?
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
-
☆ A M B ☆
- 24,524 Posts
There should be something in the Repository for parsing timestamps.
http://modxcms.com/DateTime-884.html
Sorry for confusion... I didn’t want to see the code of DateTime snippet.
I just wanted to see how you are calling DateTime snippet.
Something like [[DateTime? ...]].
Sweet! Thank you, that worked!
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.