def test_datetime_to_commitdate():
    assert_equals(datetime_to_commitdate(dt(2011, 5, 22, 0, 24, 15)),
                  '2011-05-22T00:24:15-07:00')

    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 10, 7, 30)),
                  '2011-04-09T10:07:30-07:00')
    #assert_equals(datetime_to_commitdate(dt(2011, 2, 19, 7, 16, 11)),
    #              '2011-02-19T07:16:11-08:00')
    #assert_equals(datetime_to_commitdate(dt(2010, 12, 21, 12, 34, 27)),
    #              '2010-12-21T12:34:27-08:00')
    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 10, 20, 5)),
                  '2011-04-09T10:20:05-07:00')
    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 10, 5, 58)),
                  '2011-04-09T10:05:58-07:00')
    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 9, 53, 0)),
                  '2011-04-09T09:53:00-07:00')
    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 10, 0, 21)),
                  '2011-04-09T10:00:21-07:00')
    #assert_equals(datetime_to_commitdate(dt(2010, 12, 16, 15, 10, 59)),
    #              '2010-12-16T15:10:59-08:00')
    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 9, 53, 0)),
                  '2011-04-09T09:53:00-07:00')
    assert_equals(datetime_to_commitdate(dt(2011, 4, 9, 9, 53, 0)),
                  '2011-04-09T09:53:00-07:00')
def test_datetime_to_commitdate():
    eq_(datetime_to_commitdate(dt(2011, 5, 22, 0, 24, 15)),
        '2011-05-22T00:24:15-07:00')

    eq_(datetime_to_commitdate(dt(2011, 4, 9, 10, 7, 30)),
        '2011-04-09T10:07:30-07:00')
    #eq_(datetime_to_commitdate(dt(2011, 2, 19, 7, 16, 11)),
    #    '2011-02-19T07:16:11-08:00')
    #eq_(datetime_to_commitdate(dt(2010, 12, 21, 12, 34, 27)),
    #    '2010-12-21T12:34:27-08:00')
    eq_(datetime_to_commitdate(dt(2011, 4, 9, 10, 20, 5)),
        '2011-04-09T10:20:05-07:00')
    eq_(datetime_to_commitdate(dt(2011, 4, 9, 10, 5, 58)),
        '2011-04-09T10:05:58-07:00')
    eq_(datetime_to_commitdate(dt(2011, 4, 9, 9, 53, 0)),
        '2011-04-09T09:53:00-07:00')
    eq_(datetime_to_commitdate(dt(2011, 4, 9, 10, 0, 21)),
        '2011-04-09T10:00:21-07:00')
    #eq_(datetime_to_commitdate(dt(2010, 12, 16, 15, 10, 59)),
    #    '2010-12-16T15:10:59-08:00')
    eq_(datetime_to_commitdate(dt(2011, 4, 9, 9, 53, 0)),
        '2011-04-09T09:53:00-07:00')
    eq_(datetime_to_commitdate(dt(2011, 4, 9, 9, 53, 0)),
        '2011-04-09T09:53:00-07:00')
def test_datetime_to_commitdate():
    eq_(datetime_to_commitdate(dt_utz(2011, 5, 22, 7, 24, 15)), "2011-05-22T00:24:15-07:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 17, 7, 30)), "2011-04-09T10:07:30-07:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 2, 19, 15, 16, 11)), "2011-02-19T07:16:11-08:00")
    eq_(datetime_to_commitdate(dt_utz(2010, 12, 21, 20, 34, 27)), "2010-12-21T12:34:27-08:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 17, 20, 5)), "2011-04-09T10:20:05-07:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 17, 5, 58)), "2011-04-09T10:05:58-07:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 16, 53, 0)), "2011-04-09T09:53:00-07:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 17, 0, 21)), "2011-04-09T10:00:21-07:00")
    eq_(datetime_to_commitdate(dt_utz(2010, 12, 16, 23, 10, 59)), "2010-12-16T15:10:59-08:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 16, 53, 0)), "2011-04-09T09:53:00-07:00")
    eq_(datetime_to_commitdate(dt_utz(2011, 4, 9, 16, 53, 0)), "2011-04-09T09:53:00-07:00")