Fwd: Format of datetime dump

Discussion in 'Python' started by Mateusz Loskot, Oct 19, 2012.

  1. Hi,

    I'm not sure if this list is the right place to ask question about PyYAML,
    but the yaml-core seems to be too general and quiet.
    So, I decided to forward my question here.

    I asked on yaml-core the following question, would anyone have any insights?

    Mat

    ---------- Forwarded message ----------
    From: Mateusz Loskot <>
    Date: 19 October 2012 13:58
    Subject: Format of datetime dump
    To:


    Hi,

    Given this snippet:

    yaml.dump({'date':datetime.datetime.now()})
    "{date: !!timestamp '2012-10-19 01:32:41.674322'}\n"

    Could anyone enlighten me why the ISO8601 format YYYY-MM-DDThh:mm:ssTZD
    is not used here, by default?
    Is there any mean to make yaml.dump generating datetime in ISO8601?

    Best regards,
    --
    Mateusz Loskot, http://mateusz.loskot.net


    --
    Mateusz Loskot, http://mateusz.loskot.net
     
    Mateusz Loskot, Oct 19, 2012
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davide Carboni
    Replies:
    0
    Views:
    532
    Davide Carboni
    Dec 18, 2003
  2. Christos TZOTZIOY Georgiou
    Replies:
    3
    Views:
    995
    Christos TZOTZIOY Georgiou
    Sep 13, 2003
  3. mp
    Replies:
    1
    Views:
    648
    John Machin
    Jul 28, 2006
  4. Martin
    Replies:
    0
    Views:
    610
    Martin
    Dec 27, 2008
  5. Replies:
    2
    Views:
    1,029
    M.-A. Lemburg
    Jan 6, 2009
  6. NiklasRTZ

    datetime.datetime. or datetime. ?

    NiklasRTZ, Oct 8, 2009, in forum: Python
    Replies:
    10
    Views:
    717
    niklasr
    Oct 11, 2009
  7. Igor Korot

    Fwd: datetime formatting output

    Igor Korot, Feb 8, 2014, in forum: Python
    Replies:
    0
    Views:
    126
    Igor Korot
    Feb 8, 2014
  8. Wesley
    Replies:
    1
    Views:
    453
    Wesley
    Apr 15, 2014
Loading...