What is the standard YAML date format that loads for timestamps?

X

Xeno Campanoli

Please respond with an exact syntax. I am presently using Time.at(ts)
and I end up with a null in my database.
 
T

Trans

Please respond with an exact syntax. I am presently using Time.at(ts)
and I end up with a null in my database.

Not sure I understand the question.

---
adate: 2008-04-017

This will load as a Date object.

T.
 
T

Tim Pease

Please respond with an exact syntax. I am presently using
Time.at(ts) and I end up with a null in my database.

$ ruby -ryaml -e 'puts Time.now.to_yaml'
--- 2008-04-17 08:55:11.842682 -06:00


You have to use the YAML.load function to read the timestamp back in
as a Ruby object.

Blessings,
TwP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top